diff --git a/src/gui/systray.cpp b/src/gui/systray.cpp index d1e0e76781b79..5529964341b52 100644 --- a/src/gui/systray.cpp +++ b/src/gui/systray.cpp @@ -703,6 +703,13 @@ QRect Systray::currentScreenRect() const return screen->geometry(); } +QRect Systray::currentAvailableScreenRect() const +{ + const auto screen = currentScreen(); + Q_ASSERT(screen); + return screen->availableGeometry(); +} + QPoint Systray::computeWindowReferencePoint() const { constexpr auto spacing = 4; diff --git a/src/gui/systray.h b/src/gui/systray.h index ab8fde6e2f48d..2056b7175eee7 100644 --- a/src/gui/systray.h +++ b/src/gui/systray.h @@ -167,6 +167,7 @@ private slots: [[nodiscard]] QScreen *currentScreen() const; [[nodiscard]] QRect currentScreenRect() const; + [[nodiscard]] QRect currentAvailableScreenRect() const; [[nodiscard]] QPoint computeWindowReferencePoint() const; [[nodiscard]] QPoint computeNotificationReferencePoint(int spacing = 20, NotificationPosition position = NotificationPosition::Default) const; [[nodiscard]] QPoint calcTrayIconCenter() const;