diff options
author | Petr Mrázek <peterix@gmail.com> | 2019-07-23 00:48:14 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2019-07-23 00:48:14 +0200 |
commit | bf38021937a555249905d38cda0d4ea5fbc43fb3 (patch) | |
tree | c3b52577c1e0a1861330ff3312662148c96150aa /application/pages/global | |
parent | 1e5b595923090bd19f4e5a04a5055b23e1e8678a (diff) | |
download | MultiMC-bf38021937a555249905d38cda0d4ea5fbc43fb3.tar MultiMC-bf38021937a555249905d38cda0d4ea5fbc43fb3.tar.gz MultiMC-bf38021937a555249905d38cda0d4ea5fbc43fb3.tar.lz MultiMC-bf38021937a555249905d38cda0d4ea5fbc43fb3.tar.xz MultiMC-bf38021937a555249905d38cda0d4ea5fbc43fb3.zip |
NOISSUE improve toolbars
Diffstat (limited to 'application/pages/global')
-rw-r--r-- | application/pages/global/AccountListPage.cpp | 9 | ||||
-rw-r--r-- | application/pages/global/AccountListPage.h | 1 | ||||
-rw-r--r-- | application/pages/global/AccountListPage.ui | 19 |
3 files changed, 16 insertions, 13 deletions
diff --git a/application/pages/global/AccountListPage.cpp b/application/pages/global/AccountListPage.cpp index 6ea6df9b..5270a305 100644 --- a/application/pages/global/AccountListPage.cpp +++ b/application/pages/global/AccountListPage.cpp @@ -17,6 +17,7 @@ #include "ui_AccountListPage.h" #include <QItemSelectionModel> +#include <QMenu> #include <QDebug> @@ -77,6 +78,14 @@ void AccountListPage::changeEvent(QEvent* event) QMainWindow::changeEvent(event); } +QMenu * AccountListPage::createPopupMenu() +{ + QMenu* filteredMenu = QMainWindow::createPopupMenu(); + filteredMenu->removeAction(ui->toolBar->toggleViewAction() ); + return filteredMenu; +} + + void AccountListPage::listChanged() { updateButtonStates(); diff --git a/application/pages/global/AccountListPage.h b/application/pages/global/AccountListPage.h index f4c94119..9de73f70 100644 --- a/application/pages/global/AccountListPage.h +++ b/application/pages/global/AccountListPage.h @@ -61,6 +61,7 @@ public: private: void changeEvent(QEvent * event) override; + QMenu * createPopupMenu() override; public slots: diff --git a/application/pages/global/AccountListPage.ui b/application/pages/global/AccountListPage.ui index b56d0b59..433c1f7f 100644 --- a/application/pages/global/AccountListPage.ui +++ b/application/pages/global/AccountListPage.ui @@ -32,22 +32,10 @@ </item> </layout> </widget> - <widget class="QToolBar" name="toolBar"> + <widget class="WideBar" name="toolBar"> <property name="windowTitle"> <string>toolBar</string> </property> - <property name="movable"> - <bool>true</bool> - </property> - <property name="allowedAreas"> - <set>Qt::LeftToolBarArea|Qt::RightToolBarArea</set> - </property> - <property name="toolButtonStyle"> - <enum>Qt::ToolButtonTextOnly</enum> - </property> - <property name="floatable"> - <bool>false</bool> - </property> <attribute name="toolBarArea"> <enum>RightToolBarArea</enum> </attribute> @@ -95,6 +83,11 @@ <extends>QTreeView</extends> <header>widgets/VersionListView.h</header> </customwidget> + <customwidget> + <class>WideBar</class> + <extends>QToolBar</extends> + <header>widgets/WideBar.h</header> + </customwidget> </customwidgets> <resources/> <connections/> |