mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-28 03:49:20 +03:00
Fix macOS popup y position, neglecting unneccesary calculations
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
This commit is contained in:
parent
ff92adf3e0
commit
ed9c06583a
1 changed files with 6 additions and 1 deletions
|
@ -131,6 +131,11 @@ int Systray::calcTrayWindowX()
|
|||
}
|
||||
int Systray::calcTrayWindowY()
|
||||
{
|
||||
#ifdef Q_OS_OSX
|
||||
// macOS menu bar is always 22 (effective) pixels and at the top
|
||||
// don't use availableGeometry() here, because this also excludes the dock
|
||||
return 22+6;
|
||||
#else
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
QScreen *trayScreen = QGuiApplication::screenAt(this->geometry().topRight());
|
||||
#else
|
||||
|
@ -157,7 +162,7 @@ int Systray::calcTrayWindowY()
|
|||
}
|
||||
} else {
|
||||
// tray icon is on the top
|
||||
return (trayScreen->geometry().height() - trayScreen->availableGeometry().height()) + 6;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} // namespace OCC
|
||||
|
|
Loading…
Reference in a new issue