diff options
author | Morten Sørvig <msorvig@trolltech.com> | 2009-07-27 07:53:47 (GMT) |
---|---|---|
committer | Morten Sørvig <msorvig@trolltech.com> | 2009-07-27 07:53:47 (GMT) |
commit | 8bbe5d242a9534ad29f25f800fcb5b600b3d6750 (patch) | |
tree | 3dd359f1a7bf7ed8e0b719a994e687f272ece2e2 /src/gui/kernel | |
parent | 3bf3981c7026de9017887d08312391b54fe8afc6 (diff) | |
download | Qt-8bbe5d242a9534ad29f25f800fcb5b600b3d6750.zip Qt-8bbe5d242a9534ad29f25f800fcb5b600b3d6750.tar.gz Qt-8bbe5d242a9534ad29f25f800fcb5b600b3d6750.tar.bz2 |
Mac/Cocoa: Remove separator line for "unified document tabs"
Call [NSToolbar setShowsBaselineSeparator] on the (unified) toolbar
if the window contains tabs in document mode.
Task-number: 252660
Reviewed-by: Richard Moe Gustavsen
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qt_cocoa_helpers_mac.mm | 11 | ||||
-rw-r--r-- | src/gui/kernel/qt_cocoa_helpers_mac_p.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index 3d4164a..1c4177e 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -1069,6 +1069,17 @@ void qt_mac_updateContentBorderMetricts(void * /*OSWindowRef */window, const ::H #endif } +void qt_mac_showBaseLineSeparator(void * /*OSWindowRef */window, bool show) +{ +#if QT_MAC_USE_COCOA + QMacCocoaAutoReleasePool pool; + OSWindowRef theWindow = static_cast<OSWindowRef>(window); + NSToolbar *macToolbar = [theWindow toolbar]; + if (macToolbar) + [macToolbar setShowsBaselineSeparator: show]; +#endif +} + QStringList qt_mac_NSArrayToQStringList(void *nsarray) { QStringList result; diff --git a/src/gui/kernel/qt_cocoa_helpers_mac_p.h b/src/gui/kernel/qt_cocoa_helpers_mac_p.h index 2cc7dee..741edd6 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac_p.h +++ b/src/gui/kernel/qt_cocoa_helpers_mac_p.h @@ -125,6 +125,7 @@ void macWindowSetHasShadow( void * /*OSWindowRef*/ window, bool hasShadow ); void macWindowFlush(void * /*OSWindowRef*/ window); void macSendToolbarChangeEvent(QWidget *widget); void qt_mac_updateContentBorderMetricts(void * /*OSWindowRef */window, const ::HIContentBorderMetrics &metrics); +void qt_mac_showBaseLineSeparator(void * /*OSWindowRef */window, bool show); void * /*NSImage */qt_mac_create_nsimage(const QPixmap &pm); void qt_mac_update_mouseTracking(QWidget *widget); OSStatus qt_mac_drawCGImage(CGContextRef cg, const CGRect *inbounds, CGImageRef); |