diff --git a/src/gui/systray.cpp b/src/gui/systray.cpp index 22835eb58fb83..f68126c6cd033 100644 --- a/src/gui/systray.cpp +++ b/src/gui/systray.cpp @@ -696,33 +696,6 @@ Systray::TaskBarPosition Systray::taskbarOrientation() const #endif } -// TODO: Get real taskbar dimensions Linux as well -QRect Systray::taskbarGeometry() const -{ -#if defined(Q_OS_WIN) - QRect tbRect = Utility::getTaskbarDimensions(); - //QML side expects effective pixels, convert taskbar dimensions if necessary - auto pixelRatio = currentScreen()->devicePixelRatio(); - if (pixelRatio != 1) { - tbRect.setHeight(tbRect.height() / pixelRatio); - tbRect.setWidth(tbRect.width() / pixelRatio); - } - return tbRect; -#elif defined(Q_OS_MACOS) - const auto screenWidth = currentScreenRect().width(); - const auto statusBarHeight = static_cast(OCC::menuBarThickness()); - return {0, 0, screenWidth, statusBarHeight}; -#else - if (taskbarOrientation() == TaskBarPosition::Bottom || taskbarOrientation() == TaskBarPosition::Top) { - auto screenWidth = currentScreenRect().width(); - return {0, 0, screenWidth, 32}; - } else { - auto screenHeight = currentScreenRect().height(); - return {0, 0, 32, screenHeight}; - } -#endif -} - QRect Systray::currentScreenRect() const { const auto screen = currentScreen(); diff --git a/src/gui/systray.h b/src/gui/systray.h index 57bc06259ba07..ab8fde6e2f48d 100644 --- a/src/gui/systray.h +++ b/src/gui/systray.h @@ -171,7 +171,6 @@ private slots: [[nodiscard]] QPoint computeNotificationReferencePoint(int spacing = 20, NotificationPosition position = NotificationPosition::Default) const; [[nodiscard]] QPoint calcTrayIconCenter() const; [[nodiscard]] TaskBarPosition taskbarOrientation() const; - [[nodiscard]] QRect taskbarGeometry() const; [[nodiscard]] QRect computeWindowRect(int spacing, const QPoint &topLeft, const QPoint &bottomRight) const; [[nodiscard]] QPoint computeWindowPosition(int width, int height) const; [[nodiscard]] QPoint computeNotificationPosition(int width, int height, int spacing = 20, NotificationPosition position = NotificationPosition::Default) const;