[kde-doc-english] [trojita] src/Gui: GUI: Move the mainmenu-through-toolbar button to the right/bottom edge
Jan Kundrát
jkt at kde.org
Fri Jan 29 11:39:26 UTC 2016
Git commit 6aeb9cfdf4f3aea1386916dba3f91a00a18a9dc4 by Jan Kundrát.
Committed on 27/01/2016 at 14:19.
Pushed by gerrit into branch 'master'.
GUI: Move the mainmenu-through-toolbar button to the right/bottom edge
This is what Firefox is doing with their menu, so let's see how well
this works for us.
Change-Id: I39e02176dfb7f72b2ab967da79d4b051e08a05c1
M +12 -12 src/Gui/Window.cpp
http://commits.kde.org/trojita/6aeb9cfdf4f3aea1386916dba3f91a00a18a9dc4
diff --git a/src/Gui/Window.cpp b/src/Gui/Window.cpp
index b6f1f07..75ad333 100644
--- a/src/Gui/Window.cpp
+++ b/src/Gui/Window.cpp
@@ -494,18 +494,6 @@ void MainWindow::createActions()
m_replyButton->setMenu(m_replyMenu);
m_replyButton->setDefaultAction(m_replyPrivate);
- m_menuFromToolBar = new QToolButton(this);
- m_menuFromToolBar->setIcon(UiUtils::loadIcon(QLatin1String("menu_new")));
- m_menuFromToolBar->setText(QChar(0x205d)); // Unicode 'TRICOLON'
- m_menuFromToolBar->setPopupMode(QToolButton::MenuButtonPopup);
- connect(m_menuFromToolBar, &QAbstractButton::clicked, m_menuFromToolBar, &QToolButton::showMenu);
- m_mainToolbar->addWidget(m_menuFromToolBar);
- connect(showMenuBar, &QAction::toggled, [this](const bool menuBarVisible) {
- // https://bugreports.qt.io/browse/QTBUG-35768 , we have to work on the QAction, not QToolButton
- m_mainToolbar->actions()[0]->setVisible(!menuBarVisible);
- });
- m_mainToolbar->actions()[0]->setVisible(false); // initial state to complement the default of the QMenuBar's visibility
-
m_mainToolbar->addWidget(m_composeButton);
m_mainToolbar->addWidget(m_replyButton);
m_mainToolbar->addAction(m_forwardAsAttachment);
@@ -530,6 +518,18 @@ void MainWindow::createActions()
networkIndicator->setPopupMode(QToolButton::MenuButtonPopup);
m_mainToolbar->addWidget(networkIndicator);
+ m_menuFromToolBar = new QToolButton(this);
+ m_menuFromToolBar->setIcon(UiUtils::loadIcon(QLatin1String("menu_new")));
+ m_menuFromToolBar->setText(QChar(0x205d)); // Unicode 'TRICOLON'
+ m_menuFromToolBar->setPopupMode(QToolButton::MenuButtonPopup);
+ connect(m_menuFromToolBar, &QAbstractButton::clicked, m_menuFromToolBar, &QToolButton::showMenu);
+ m_mainToolbar->addWidget(m_menuFromToolBar);
+ connect(showMenuBar, &QAction::toggled, [this](const bool menuBarVisible) {
+ // https://bugreports.qt.io/browse/QTBUG-35768 , we have to work on the QAction, not QToolButton
+ m_mainToolbar->actions().last()->setVisible(!menuBarVisible);
+ });
+ m_mainToolbar->actions().last()->setVisible(false); // initial state to complement the default of the QMenuBar's visibility
+
busyParsersIndicator->setFixedSize(m_mainToolbar->iconSize());
{
More information about the kde-doc-english
mailing list