summaryrefslogtreecommitdiffstats
path: root/application/pages/global
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2019-07-23 00:48:14 +0200
committerPetr Mrázek <peterix@gmail.com>2019-07-23 00:48:14 +0200
commitbf38021937a555249905d38cda0d4ea5fbc43fb3 (patch)
treec3b52577c1e0a1861330ff3312662148c96150aa /application/pages/global
parent1e5b595923090bd19f4e5a04a5055b23e1e8678a (diff)
downloadMultiMC-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.cpp9
-rw-r--r--application/pages/global/AccountListPage.h1
-rw-r--r--application/pages/global/AccountListPage.ui19
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/>