Make the tool bar always visible on all screens

This commit is contained in:
ArsenArsen 2017-07-26 23:29:26 +02:00
parent f3627356b6
commit 097b6991da
No known key found for this signature in database
GPG Key ID: C631EC9C50708CF4
1 changed files with 3 additions and 2 deletions

View File

@ -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);
});
}