return tbRect;
#elif defined(Q_OS_MACOS)
// Finder bar is always 22px height on macOS (when treating as effective pixels)
- auto screenWidth = currentScreenRect().width();
- return {0, 0, screenWidth, 22};
+ const auto screenWidth = currentScreenRect().width();
+ const auto statusBarHeight = static_cast<int>(OCC::statusBarThickness());
+ return {0, 0, screenWidth, statusBarHeight};
#else
if (taskbarOrientation() == TaskBarPosition::Bottom || taskbarOrientation() == TaskBarPosition::Top) {
auto screenWidth = currentScreenRect().width();
bool canOsXSendUserNotification();
void sendOsXUserNotification(const QString &title, const QString &message);
void setTrayWindowLevelAndVisibleOnAllSpaces(QWindow *window);
+double statusBarThickness();
#endif
/**
namespace OCC {
+double statusBarThickness()
+{
+ return [NSStatusBar systemStatusBar].thickness;
+}
+
bool canOsXSendUserNotification()
{
return NSClassFromString(@"NSUserNotificationCenter") != nil;