summaryrefslogtreecommitdiffstats
path: root/src/plugins/styles/mac
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-311-1/+6
| | | | | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro qmake/library/qmakebuiltins.cpp src/corelib/global/qglobal.cpp Re-apply b525ec2 to qrandom.cpp(code movement in 030782e) src/corelib/global/qnamespace.qdoc src/corelib/global/qrandom.cpp src/gui/kernel/qwindow.cpp Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08) src/network/ssl/qsslkey_openssl.cpp src/plugins/platforms/android/androidjniinput.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/widgets/widgets/qmenu.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-152-7/+23
| | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoamenu.h src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/widgets/styles/qstylehelper_p.h Change-Id: I54247c98dd79d2b3826fc062b8b11048c9c7d9bb
* Merge remote-tracking branch 'origin/5.9' into devOswald Buddenhagen2017-08-022-35/+47
| | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/widgets/qdockarealayout.cpp src/widgets/widgets/qmainwindow.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmainwindowlayout_p.h tests/auto/corelib/tools/qlocale/tst_qlocale.cpp tests/auto/other/macnativeevents/BLACKLIST tests/auto/widgets/widgets/qmenu/BLACKLIST Change-Id: Ic8e724b80a65e7b1af25511b0e674d209265e567
* Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-07-192-2/+6
| | | | | | | | Conflicts: src/corelib/io/qwindowspipewriter.cpp src/widgets/styles/qcommonstyle.cpp Change-Id: I0d33efdc4dc256e234abc490a18ccda72cd1d9e6
* macOS: Fix exception when drawing scrollbars with zero-rangeTor Arne Vestbø2017-07-141-1/+2
| | | | | | | | | | | | | | | | | | | | Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]' 0 CoreFoundation __exceptionPreprocess 1 libobjc.A.dylib objc_exception_throw 2 CoreFoundation +[NSException raise:format:] 3 QuartzCore _ZN2CA5Layer12set_positionERKNS_4Vec2IdEEb 4 QuartzCore -[CALayer setPosition:] 5 QuartzCore -[CALayer setFrame:] 6 AppKit -[NSScrollerImp _updateLayerGeometry] 7 AppKit -[NSScroller setFloatValue:knobProportion:] 8 libqmacstyle setupScroller(NSScroller*, QStyleOptionSlider const*) 9 libqmacstyle QMacStyle::drawComplexControl(...) Change-Id: I5afe7e7d3e94ff1d9ee34f5a9bc0d229d4f7c4c6 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devGabriel de Dietrich2017-07-132-12/+65
| | | | | | | Conflicts: src/widgets/widgets/qmainwindowlayout.cpp Change-Id: I306b4f5ad11bceb336c9091241b468d455fe6bb6
* QMacStyle: Simplify logic for SC_GroupBoxLabel rectangleGabriel de Dietrich2017-07-102-29/+18
| | | | | | | | | | | This removes the single occurrence of HIThemeGetTextDimensions. Since we have access to the actual platform font through QPlatformTheme::font(), it's possible to use QFontMetricsF instead. We also cache small and mini system fonts to be reused in other places. Change-Id: I799c61eef0a2a6880a1c51aa7d3105c7e5b0ed4f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QMacStyle: Simplify rendering SC_GroupBoxLabelGabriel de Dietrich2017-07-101-27/+12
| | | | | | | Removes the last occurrence of HITHemeDrawTextBox. Change-Id: I13804a16672c692a4405d8b2f9d5fb6a132a6b7b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QMacStyle: Simplify CE_PushButtonLabel, CE_TabBarTabLabelGabriel de Dietrich2017-07-101-138/+54
| | | | | | | | | | We don't need the calls to HIThemeDrawTextBox after all. These render simple text nowadays, so we can do this with Qt APIs. Also fixes TabBarPalette in QCocoaTheme. Change-Id: Ib9436be83f03bd62fca40feb110a86602794c5b7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QMacStyle: De-Carbonize QScrollBarGabriel de Dietrich2017-07-071-472/+385
| | | | | | | | | | | | | | | | | | | | Addresses drawing, hit testing, subcontrol rects and one metric. Also fixes the knob width on hovered transient scrollbars. Since Cocoa won't help for this (and never will), we do it manually. For non-transient scrollbars, no more HITheme. That's why we're doing this after all. It also comes with its own small hack; see how we darken the knob when hovered. We had to de-intertwine the logic with QSlider in drawComplexControl(), which now gets its own full case CC_Slider statements. QSlider will be addressed next. Task-number: QTBUG-49585 Change-Id: Iced58d52fff0c11866bdf6eb562dbab36c8f3ef2 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-042-2/+9
| | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/util/util.pri tests/auto/corelib/thread/qthread/qthread.pro tests/auto/corelib/thread/qthread/tst_qthread.cpp Change-Id: I5c45ab54d46d3c75a5c6c116777ebf5bc47a871b
* QStyleAnimation: Go down to 15 fpsGabriel de Dietrich2017-06-011-2/+2
| | | | | | | | | | | | | | | | | The new implementation of CE_ProgressBarContents in QMacStyle uses NSProgressIndicator, which is noticeably heavier than the previously used HITheme API. Setting the animation frame rate to 20 fps improves things significantly compared to the default 30 fps, but Cocoa seems to update the animation at 15 fps for indeterminate NSProgressIndicator. Going down to 12 or 10 fps may be an option in the future, but it's not compatible with NSProgressIndicator. Change-Id: Ie1e18d7d78d1bd7ea38a12d715a6a7db0e175a29 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QMacStyle: Remove HITheme APIs to render QProgresssBarGabriel de Dietrich2017-06-012-50/+147
| | | | | | | | | | We use NSProgressIndicator in a similar fashion as we do with NSScroller for transient scrollers. Also changed the signature of QCocoaDrawRectBlock. Change-Id: I0fef8e327494fb557af2c2bab2aafa57c2e69564 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QMacStyle: Remove unused default button logicGabriel de Dietrich2017-05-162-47/+6
| | | | | | | | The auto-default button part must remain, but the pulsating animation logic can go. Same for the pressed button logic. Change-Id: I0e9a755f86601780a219296fbc02a1eb2b703aea Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Move disclosure triangle into cocoaCell() logicGabriel de Dietrich2017-05-152-11/+11
| | | | | Change-Id: Ica7766dabba57af3107ea275aa48514bc65158fb Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Use NSStepperCell for QSpinBox buttonsGabriel de Dietrich2017-05-152-65/+71
| | | | | | | Includes painting and subcontrol rectangles. Change-Id: I9a4c704bdea4f20f8dca94de24063f3e14dbaf91 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Remove a couple void *, dead codeGabriel de Dietrich2017-05-152-20/+13
| | | | | Change-Id: If05fbdf8cc5ced81adfd75232313969223bf1453 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Move NSScrollers into cocoaControl() logicGabriel de Dietrich2017-05-152-15/+11
| | | | | | | This patch amends b1131074199aae97. Change-Id: Ib305554763457ae4b5a441e41947304cff2853a2 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Refactor NSGraphicsContext setup logicGabriel de Dietrich2017-05-152-24/+30
| | | | | Change-Id: I00d473454bf970ef55f44d6094039b3f02221155 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Remove brushed metal related codeGabriel de Dietrich2017-05-151-70/+17
| | | | | Change-Id: I000d70c7bcc839c04a89cb87052187eeec62243f Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Replace QAquaWidgetSize with WidgetSizePolicyGabriel de Dietrich2017-05-152-218/+206
| | | | | | | | | No need to have two enums for the exact same purpose. qmacstyle auto-test updated as well. Change-Id: Ia601648191e39c0cbbaa7477143441005ae063c2 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Replace HIRect, HIPoint with CGRect, CGPointGabriel de Dietrich2017-05-152-116/+101
| | | | | | | | | We probably changed how rounding is done between CGRect and QRect coordinates, but we expect more things to change in the near future. Change-Id: If961849c46edc5fcfee9aef2acda57f386b2928b Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Remove HITheme for CE_MenuItem, etc.Gabriel de Dietrich2017-05-151-122/+69
| | | | | | | Includes the unlikely non-native menu bar. Change-Id: Ibc36cbdbe5add3798fe65066d87c48e84804ec33 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Remove HIShapeGetBounds hackGabriel de Dietrich2017-05-122-21/+11
| | | | | | | | | | | Link to ApplicationServices since that's where this function is located. Whether this framework may be removed with Carbon is unknown at the moment. It does remove an obscure dependency nonetheless. Change-Id: If6514f70ca434298f1c88457adac51d38a1afa22 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Get rid of GetTheme* metric functionsGabriel de Dietrich2017-05-121-68/+143
| | | | | Change-Id: I88f52db58a57ff8ff9aeee9e475d193186a7abb9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-072-12/+25
| | | | | | | | Conflicts: src/network/access/qnetworkreply.cpp tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
* Pluginize the platform stylesJake Petroules2017-04-147-0/+7720
This enforces decoupling and in the case of QMacStyle, isolates QtWidgets and therefore end user applications, from Carbon/HITheme. Windows and Fusion are platform independent, so they remain built-in (but mostly because the Windows style is tightly coupled to other styles like QStylesheetStyle). Task-number: QTBUG-59428 Change-Id: Id6519fe0c5269c1bce5b5921f9db06257032a1c9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>