Improve window hints and tray icon
This commit is contained in:
parent
66547cb023
commit
34549c2f7f
@ -5,7 +5,7 @@ CropView::CropView(QGraphicsScene *scene) : QGraphicsView(scene)
|
||||
setFrameShape(QFrame::NoFrame); // Time taken to solve: A george99g and 38 minutes.
|
||||
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
setWindowFlags(Qt::WindowStaysOnTopHint | Qt::CustomizeWindowHint);
|
||||
setWindowFlags(Qt::BypassWindowManagerHint | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::Tool);
|
||||
}
|
||||
|
||||
void CropView::keyPressEvent(QKeyEvent *e)
|
||||
|
@ -46,6 +46,10 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
|
||||
menu->addActions({ fullscreen, area });
|
||||
connect(quit, &QAction::triggered, this, &MainWindow::quit);
|
||||
connect(shtoggle, &QAction::triggered, this, &MainWindow::toggleVisible);
|
||||
connect(tray, &QSystemTrayIcon::messageClicked, this, &MainWindow::toggleVisible);
|
||||
connect(tray, &QSystemTrayIcon::activated, this, [this](QSystemTrayIcon::ActivationReason reason) {
|
||||
if (reason == QSystemTrayIcon::DoubleClick) toggleVisible();
|
||||
});
|
||||
connect(fullscreen, &QAction::triggered, this, &MainWindow::on_actionFullscreen_triggered);
|
||||
connect(area, &QAction::triggered, this, &MainWindow::on_actionArea_triggered);
|
||||
tray->setContextMenu(menu);
|
||||
|
Loading…
Reference in New Issue
Block a user