mirror of
https://github.com/fergalmoran/flameshot.git
synced 2026-01-06 09:03:58 +00:00
fixed placement issue on windows when multi-monitor setup
This commit is contained in:
@@ -104,9 +104,12 @@ CaptureWidget::CaptureWidget(const uint id,
|
||||
|
||||
for (QScreen* const screen : QGuiApplication::screens()) {
|
||||
QPoint topLeftScreen = screen->geometry().topLeft();
|
||||
if (topLeft.x() > topLeftScreen.x() ||
|
||||
topLeft.y() > topLeftScreen.y()) {
|
||||
topLeft = topLeftScreen;
|
||||
|
||||
if (topLeftScreen.x() < topLeft.x()) {
|
||||
topLeft.setX(topLeftScreen.x());
|
||||
}
|
||||
if (topLeftScreen.y() < topLeft.y()) {
|
||||
topLeft.setY(topLeftScreen.y());
|
||||
}
|
||||
}
|
||||
move(topLeft);
|
||||
|
||||
Reference in New Issue
Block a user