From dc488ed8f9cfb9ee0542402c92010b0f08e14ad6 Mon Sep 17 00:00:00 2001 From: Gurkengewuerz Date: Tue, 7 May 2019 20:18:22 +0200 Subject: [PATCH] moved quit button to the bottom --- src/mainwindow.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 09217cd..d47ed40 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -55,7 +55,6 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi tray->setToolTip("KShare"); tray->setVisible(true); menu = new QMenu(this); - QAction *quit = ACTION(tr("Quit"), menu); QAction *shtoggle = ACTION(tr("Show/Hide"), menu); QAction *fullscreen = ACTION(tr("Take fullscreen shot"), menu); QAction *area = ACTION(tr("Take area shot"), menu); @@ -68,7 +67,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi QAction *rec = ACTION(tr("Record screen"), menu); QAction *recoff = ACTION(tr("Stop recording"), menu); QAction *recabort = ACTION(tr("Abort recording"), menu); - menu->addActions({ quit, shtoggle, picker }); + menu->addActions({ shtoggle, picker }); menu->addSeparator(); menu->addActions({ fullscreen, area }); #ifdef PLATFORM_CAPABILITY_ACTIVEWINDOW @@ -76,6 +75,12 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi #endif menu->addSeparator(); menu->addActions({ rec, recoff, recabort }); + + QAction *quit = ACTION(tr("Quit"), menu); + QAction *about = ACTION(tr("About"), menu); + menu->addSeparator(); + menu->addActions({ about, quit }); + connect(quit, &QAction::triggered, this, &MainWindow::quit); connect(shtoggle, &QAction::triggered, this, &MainWindow::toggleVisible); connect(picker, &QAction::triggered, [] { ColorPickerScene::showPicker(); });