From 097b6991dadce2cf856831d8db9014310b36006b Mon Sep 17 00:00:00 2001 From: ArsenArsen Date: Wed, 26 Jul 2017 23:29:26 +0200 Subject: [PATCH] Make the tool bar always visible on all screens --- cropeditor/cropscene.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cropeditor/cropscene.cpp b/cropeditor/cropscene.cpp index 49e5084..fcee0b8 100644 --- a/cropeditor/cropscene.cpp +++ b/cropeditor/cropscene.cpp @@ -149,8 +149,9 @@ CropScene::CropScene(QObject *parent, QPixmap pixmap) cursorPos = QPoint(pf.x(), pf.y()); cursorItem->setPos(cursorPos); updateMag(); - int w = QApplication::primaryScreen()->geometry().width(); - widget->setPos((w - widget->boundingRect().width()) / 2, 100); + auto screen = QApplication::primaryScreen(); + int w = screen->geometry().width(); + widget->setPos((w - widget->boundingRect().width()) / 2, screen->geometry().top() + 100); }); }