From 086c49544a6200bdef1a30d1f2f4944e3a1bb90b Mon Sep 17 00:00:00 2001 From: shibakaneki Date: Tue, 21 Jun 2011 16:29:29 +0200 Subject: [PATCH] Adapted the defines to the MAC version --- src/core/UBDisplayManager.cpp | 4 ++-- src/desktop/UBDesktopAnnotationController.cpp | 2 +- src/gui/UBDockPalette.cpp | 4 ++-- src/gui/UBFloatingPalette.cpp | 2 ++ 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/core/UBDisplayManager.cpp b/src/core/UBDisplayManager.cpp index 6a667560..cdeb6048 100644 --- a/src/core/UBDisplayManager.cpp +++ b/src/core/UBDisplayManager.cpp @@ -115,7 +115,7 @@ void UBDisplayManager::setAsControl(QWidget* pControlWidget ) mControlWidget->setGeometry(mDesktop->screenGeometry(mControlScreenIndex)); mControlWidget->showFullScreen(); // !!!! Should be included into Windows after QT recompilation -#ifndef Q_WS_WIN +#ifdef Q_WS_MAC mControlWidget->setAttribute(Qt::WA_MacNoShadow); #endif } @@ -131,7 +131,7 @@ void UBDisplayManager::setAsDisplay(QWidget* pDisplayWidget) mDisplayWidget->setGeometry(mDesktop->screenGeometry(mDisplayScreenIndex)); mDisplayWidget->showFullScreen(); // !!!! Should be included into Windows after QT recompilation -#ifndef Q_WS_WIN +#ifdef Q_WS_MAC mDisplayWidget->setAttribute(Qt::WA_MacNoShadow); #endif } diff --git a/src/desktop/UBDesktopAnnotationController.cpp b/src/desktop/UBDesktopAnnotationController.cpp index 5f2e1a9a..c9707857 100644 --- a/src/desktop/UBDesktopAnnotationController.cpp +++ b/src/desktop/UBDesktopAnnotationController.cpp @@ -61,7 +61,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent) mTransparentDrawingView->setAttribute(Qt::WA_TranslucentBackground, true); // !!!! Should be included into Windows after QT recompilation -#ifndef Q_WS_WIN +#ifdef Q_WS_MAC mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true); #endif mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Window); diff --git a/src/gui/UBDockPalette.cpp b/src/gui/UBDockPalette.cpp index aae28de1..4f49d227 100644 --- a/src/gui/UBDockPalette.cpp +++ b/src/gui/UBDockPalette.cpp @@ -35,8 +35,8 @@ UBDockPalette::UBDockPalette(QWidget *parent, const char *name) setAttribute(Qt::WA_TranslucentBackground); // !!!! Should be included into Windows after QT recompilation -#ifndef Q_WS_WIN - setAttribute(Qt::WA_MacNoShadow); +#ifdef Q_WS_MAC + setAttribute(Qt::WA_MacNoShadow); #endif } diff --git a/src/gui/UBFloatingPalette.cpp b/src/gui/UBFloatingPalette.cpp index 2338dae1..23751ab5 100644 --- a/src/gui/UBFloatingPalette.cpp +++ b/src/gui/UBFloatingPalette.cpp @@ -30,6 +30,8 @@ UBFloatingPalette::UBFloatingPalette(Qt::Corner position, QWidget *parent) #ifndef Q_WS_WIN setAttribute(Qt::WA_TranslucentBackground); setAttribute(Qt::WA_MacAlwaysShowToolWindow); +#endif +#ifdef Q_WS_MAC setAttribute(Qt::WA_MacNonActivatingToolWindow); setAttribute(Qt::WA_MacNoShadow); #endif