summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArvid Ephraim Picciani <arvid.picciani@nokia.com>2010-11-24 10:39:33 (GMT)
committerArvid Ephraim Picciani <arvid.picciani@nokia.com>2010-11-24 11:30:43 (GMT)
commit7d11b50933ad6cfaebda1190d8d8b9ba470c8013 (patch)
treede1272497cc10848c007688f783cd95b1119eb5b
parentf99e4bb57544c96550204d826c217812cfb010d3 (diff)
downloadQt-7d11b50933ad6cfaebda1190d8d8b9ba470c8013.zip
Qt-7d11b50933ad6cfaebda1190d8d8b9ba470c8013.tar.gz
Qt-7d11b50933ad6cfaebda1190d8d8b9ba470c8013.tar.bz2
Add WA_MacNoShadow widget attribute
Task-number: QTBUG-6831 Reviewed-by: Fabien Freling <fabien.freling@nokia.com>
-rw-r--r--src/corelib/global/qnamespace.h2
-rw-r--r--src/corelib/global/qnamespace.qdoc3
-rw-r--r--src/gui/kernel/qwidget_mac.mm5
3 files changed, 9 insertions, 1 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index 3ed6291..6afc9a2 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -519,6 +519,8 @@ public:
WA_X11DoNotAcceptFocus = 132,
+ WA_MacNoShadow = 133,
+
// Add new attributes before this line
WA_AttributeCount
};
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index f097f2a..b9939b6 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -1257,6 +1257,9 @@
to this top level window. This attribute has no effect on non-X11
platforms.
+ \value WA_MacNoShadow Since Qt 4.8, this attribute disables drop shadows
+ for this top level window. Only affects Cocoa builds of Qt for Mac OS X.
+
\omitvalue WA_SetLayoutDirection
\omitvalue WA_InputMethodTransparent
\omitvalue WA_WState_CompressKeys
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 882f03b..bcddae5 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -2294,7 +2294,10 @@ void QWidgetPrivate::finishCreateWindow_sys_Cocoa(void * /*NSWindow * */ voidWin
} else {
[windowRef setHidesOnDeactivate:NO];
}
- [windowRef setHasShadow:YES];
+ if (q->testAttribute(Qt::WA_MacNoShadow))
+ [windowRef setHasShadow:NO];
+ else
+ [windowRef setHasShadow:YES];
Q_UNUSED(parentWidget);
Q_UNUSED(dialog);