From 369408eed067c1ca76759ef22ea5dfc4facdf082 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Tue, 4 Jun 2019 18:25:31 -0400 Subject: reverted changes to the toolbar: - swapped back "add profile" and "install mod" icons - removed links toolbar, icons are added to the main one - locked the toolbar because there's only one now - right align everything after the last separator and executable shortcuts --- src/mainwindow.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/mainwindow.h') diff --git a/src/mainwindow.h b/src/mainwindow.h index 81b6a656..679065bd 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -207,6 +207,7 @@ private: void cleanup(); + void setupToolbar(); void setupActionMenu(QAction* a); void createHelpMenu(); void createEndorseMenu(); @@ -328,6 +329,10 @@ private: // the window is closed and the menubar is hidden bool m_menuBarVisible; + // last separator on the toolbar, used to add spacer for right-alignment and + // as an insert point for executables + QAction* m_linksSeparator; + MOBase::TutorialControl m_Tutorial; int m_OldProfileIndex; @@ -602,7 +607,7 @@ private slots: */ void allowListResize(); - void linksToolBar_customContextMenuRequested(const QPoint &point); + void toolBar_customContextMenuRequested(const QPoint &point); void removeFromToolbar(); void overwriteClosed(int); @@ -640,7 +645,6 @@ private slots: // ui slots void on_actionExit_triggered(); void on_actionMainMenuToggle_triggered(); void on_actionToolBarMainToggle_triggered(); - void on_actionToolBarLinksToggle_triggered(); void on_actionToolBarSmallIcons_triggered(); void on_actionToolBarMediumIcons_triggered(); void on_actionToolBarLargeIcons_triggered(); -- cgit v1.3.1 From 479150a619bbfdfa8d7527e0fee28daecd22724c Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Tue, 4 Jun 2019 18:33:23 -0400 Subject: show the main menu when releasing alt instead of pressing, less annoying to take screenshots with alt+printscreen without having the menu pop up --- src/mainwindow.cpp | 4 ++-- src/mainwindow.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mainwindow.h') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 60a86b95..bf357c20 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -6880,7 +6880,7 @@ void MainWindow::dropEvent(QDropEvent *event) event->accept(); } -void MainWindow::keyPressEvent(QKeyEvent *event) +void MainWindow::keyReleaseEvent(QKeyEvent *event) { // if the menubar is hidden, pressing Alt will make it visible if (event->key() == Qt::Key_Alt) { @@ -6890,7 +6890,7 @@ void MainWindow::keyPressEvent(QKeyEvent *event) } } - QMainWindow::keyPressEvent(event); + QMainWindow::keyReleaseEvent(event); } void MainWindow::on_clickBlankButton_clicked() diff --git a/src/mainwindow.h b/src/mainwindow.h index 679065bd..35ac75a9 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -195,7 +195,7 @@ protected: virtual void resizeEvent(QResizeEvent *event); virtual void dragEnterEvent(QDragEnterEvent *event); virtual void dropEvent(QDropEvent *event); - void keyPressEvent(QKeyEvent *event) override; + void keyReleaseEvent(QKeyEvent *event) override; private slots: void on_actionChange_Game_triggered(); -- cgit v1.3.1