summaryrefslogtreecommitdiffstats
path: root/src/plugins/styles
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-05-023-2/+8
|\ | | | | | | Change-Id: Ia082e20e2eb4b76afd4c1a1584ff4e5514655d7a
| * Convert features.toolbar to QT_[REQUIRE_]CONFIGStephan Binner2018-05-023-2/+8
| | | | | | | | | | | | | | | | Move declaration of pick/perp helpers up the dependency chain Change-Id: I7084ed829a057a0c45d60445c416fb07f2cb5624 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-202-179/+121
|\| | | | | | | Change-Id: I0bea38585382b5d9c8d7a013bf6bcb3a6008d159
| * QMacStyle: Fix SC_ComboBoxEditField rectGabriel de Dietrich2018-04-181-2/+1
| | | | | | | | | | Change-Id: I851e4bb1e0177ef5c594328c717e58ec7c9494e3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * QMacStyle: Fix appearance of selected inactive tab bar buttonGabriel de Dietrich2018-04-181-9/+50
| | | | | | | | | | | | | | | | | | | | Because we use toggle NSButton for selected tabs, the inactive appearance doesn't follow what NSSegmentedControl would have shown. Therefore, we fall back to our good old habits, i.e., render on a pixmap and do some pixel transformations. Change-Id: I838a2f23abee5846219ba67328c79fa8cc359a9b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * QMacStyle: Clean up code, remove dead bitsGabriel de Dietrich2018-04-182-170/+72
| | | | | | | | | | | | | | | | | | | | | | | | Change QMacStylePrivate::drawNSViewInRect() signature to remove all the unused parameters. Reuse recent tab direction functions where appropriate. Includes the infamous outter -> outer fix. Change-Id: I8f92d79d8a6c3b5903bfbb13293afb6f72a5340b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Windows: Fix MDI child window titles in High-DPI displaysAndre de la Rocha2018-04-192-20/+24
| | | | | | | | | | | | | | | | | | | | | | This change improves the appearance of MDI child windows in a High-DPI display for applications using the WindowsVista style, with the Qt::AA_EnableHighDpiScaling attribute set. Task-number: QTBUG-64708 Change-Id: I5e9fbd23809b440ffd33e4948c83d115cc6e1910 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-153-211/+1
|\| | | | | | | Change-Id: I8c353b4c53e90434453c76691eac39a894d23b49
| * QMacStyle doesn't depend on Carbon anymoreGabriel de Dietrich2018-04-123-211/+1
| | | | | | | | | | | | | | | | We also remove the old documentation file that is now mostly outdated. Change-Id: I32c9c6b0984be5e41653a92b0b9287a89f73ee38 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLars Knoll2018-04-122-739/+484
|\| | | | | | | Change-Id: I9f802cb9b4d9ccba77ca39428a5cb1afd2d01642
| * QMacStyle: CE_TabBarTabShape is now HITheme-freeGabriel de Dietrich2018-04-122-103/+163
| | | | | | | | | | | | | | | | | | | | | | This should be the last bit of QMacStyle depending on HIToolBox APIs. Small and mini sizes support coming later. Same for the focus ring. Change-Id: If625fccb87ebd0607b96a8c5040888df5a2a1032 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * QMacStyle: SE_TreeViewDisclosureItem is now HITheme-freeGabriel de Dietrich2018-04-121-18/+3
| | | | | | | | | | Change-Id: I34f1325adc661edde7bba7d7374bc8cfb80900ae Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * QMacStyle: PE_FrameTabWidget in now HITheme-freeGabriel de Dietrich2018-04-122-74/+57
| | | | | | | | | | Change-Id: If14e67bdae41099bb87fe2d7c4f65926d325766b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * QMacStyle: Remove cached focus ring drawingGabriel de Dietrich2018-04-121-79/+23
| | | | | | | | | | | | | | | | | | We go for direct drawing for now. Some of the logic was a bit sketchy, and we need to measure how useful is caching and eventually compatible with the focus frame animation. Change-Id: Id30a68f77a4129197536e8ca251906ee8a730925 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * QMacStyle: CC_ComboBox is now HITheme-freeGabriel de Dietrich2018-04-122-468/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the time being, no more stretched QComboBox. They were already looking bad before and nobody complained, so it's a non-issue. In the future, we might use square combo boxes in the same way as we do for push buttons but for non-editable QComboBox only. Removes what is now dead code, including some leftovers. tst_QMacStyle updated to reflect size changes to accom- modate the focus ring. Change-Id: I60fac86b9acb52cc96373bca0b3cad598ec4f1e7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-061-1/+2
|\| | | | | | | Change-Id: Ic811cd444e523b904211797112bba6aaec85dddd
| * QMacStyle: Fix "on" toggle button text colorGabriel de Dietrich2018-04-051-1/+2
| | | | | | | | | | Change-Id: I344c63debdcf012a16305f1b2124e8ad0785d982 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-03-283-435/+417
|\| | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_mouse.mm src/testlib/testlib.pro Change-Id: Ia0ce4243418fe6a485b0f290c67bd433b3b04ff2
| * QMacStyle: Fix spinbox implicit heightGabriel de Dietrich2018-03-271-1/+1
| | | | | | | | | | | | | | We don't need to accommodate for the fake frame anymore. Change-Id: I2d84441d4239e1ff68f640dffda1a0d1a97fa2b3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * QMacStyle: Fix text color for disabled default buttonsGabriel de Dietrich2018-03-271-4/+5
| | | | | | | | | | Change-Id: I7c6ba0c3818a3e269e0350153cbde355bafd249a Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * QMacStyle: Remove CT_ToolButton related dead codeGabriel de Dietrich2018-03-271-29/+0
| | | | | | | | | | | | | | | | | | sizeFromContents() just adds 10 points to the tool button size and returns. Therefore, the HITheme code that used to be shared with CT_PushButton becomes effectively dead. Change-Id: Ib0519b0037ec3097a00e2c14067d851040853499 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * QMacStyle: SE_PushButtonContents is HITheme-freeGabriel de Dietrich2018-03-272-131/+42
| | | | | | | | | | | | | | | | This also removes a few HITheme-related functions that are no longer needed. Change-Id: I356938d1e99f5fed106c945a94050fa35db58716 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * QMacStyle: Do manual button sizing for CT_PushButtonGabriel de Dietrich2018-03-271-40/+37
| | | | | | | | | | | | | | | | | | We guarantee the same sizes as previously with HITheme for most common cases. Exotic cases may break and will be fixed along the way. Change-Id: I3e3e6ea702c7489c1cbaa821a30916f63c440c1f Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * QMacStyle: Don't highlight square buttons text when pressedGabriel de Dietrich2018-03-221-4/+6
| | | | | | | | | | | | | | | | | | | | Native square buttons keep their text black when pressed or on. Plus using the QStyleOptionButton variable over the QStyleOption one where appropriate. Change-Id: Idba8197e64d408e8a0987f1ef9243fde08e3e839 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * QMacStyle: Refactor button sizingGabriel de Dietrich2018-03-222-44/+47
| | | | | | | | | | | | | | | | | | | | We prepare for a better world without HITheme. Sadly, we can't guarantee Cocoa will be good enough as a replacement. So, expect more hardcoded values and margins. Change-Id: I915906b5dbfbfbfc8c7f5c3224fc0ed98562bb9f Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * QMacStyle: Make CE_PushButtonBevel square if large enoughGabriel de Dietrich2018-03-222-37/+94
| | | | | | | | | | | | | | | | | | | | | | | | Meaning, if larger than the size of a regular NSButton. No intermediate size square buttons anymore. We'll try to get the closest one later, once the sizing problem is solved. We also refactor the button creation code a bit. Change-Id: I965520469546aea596cd1abec2309b40d70399ce Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * QMacStyle: No more HITheme for CC_ToolButtonGabriel de Dietrich2018-03-222-73/+38
| | | | | | | | | | | | | | | | As for CE_PushButtonBevel, sizing is still pending. These two seem to go together anyway. Change-Id: I631c3f32ba201b16adbfa264a2920bfb636fb86f Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * QMacStyle: No more HITheme for CE_PushButtonBevelGabriel de Dietrich2018-03-222-112/+156
| | | | | | | | | | | | | | | | For rendering only. Sizing is still pending and, consequently, square buttons since these depend on the button's intrinsic size. Change-Id: Iacadc02a1a75970b221543b32ca724c92e118ce1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * QMacStyle: Make CocoaControl a full typeGabriel de Dietrich2018-03-222-50/+80
| | | | | | | | | | | | | | And one small code clean-up. Change-Id: I57c71ce2e18c95529ee45ba4fdfc68e21209e384 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * offscreen: Check that native interface is valid before using itAndy Shaw2018-03-211-1/+2
| | | | | | | | | | | | | | | | | | If the offscreen platform plugin is used on Windows then it can end up crashing since there is no native interface. This prevents a crash from occurring when these functions are called. Change-Id: I526fc0703771fa5f85b26d182ad3b15ef1a3ada5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Clean up our Objective-C usageJake Petroules2018-02-201-14/+4
|/ | | | | | | | | | | | | | | | - Move ivars into @implementation - Use instancetype where applicable - Use dot notation for property access - Use subscript operator for dictionaries and arrays - Format selectors consistently - Use proper style for init methods - Use generics instead of void pointers where possible - Use "range for" loops instead of indexing - Replace or replace IBAction/IBOutlet with void Change-Id: I1667812a51d4dfe44ae80fe337cb1f4bc9699d92 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Reapply 0d9208cecbbd9ed08e4ffb6540729668e3bd7754 on 5.11v5.11.0-alpha1Liang Qi2018-02-141-5/+3
| | | | | | | | | | | | This change amends 305dd1b61f657474d751cc3b24f58249ec21b61b, which lost 0d9208ce and brought src/plugins/styles/mac/qmacstyle_mac.mm back. In 4f3249f32dbe5c20aabbfd9b4f9c558aaf449e48, it was moved to src/plugins/styles/mac in 5.10. Task-number: QTBUG-65773 Change-Id: I721268caf12067ed798f5846234cd2fdf3e493dc Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Merge "Merge remote-tracking branch 'origin/dev' into 5.11" into ↵Jani Heikkinen2018-02-104-67/+97
|\ | | | | | | refs/staging/5.11
| * Merge remote-tracking branch 'origin/dev' into 5.11Liang Qi2018-02-104-67/+97
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvarlengtharray.qdoc src/corelib/tools/qvector.qdoc Resolved documentation changes in favor of 017569f702b6dd0, which keeps the move overloads along with its const-ref sibling. Change-Id: I0835b0b3211a418e5e50defc4cf315f0964fab79
| | * Fix HiDPI rendering issues in the WindowsVista styleAndre de la Rocha2018-02-022-28/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixing miscellaneous rendering issues to make the WindowsVista style look good on High DPI displays: - Fixed size/resolution of combo box arrows, and changed to native look. - Fixed vanishing horizontal line in the frame of line edit widgets. - Fixed gaps in combo box popup. - Fixed size/resolution of arrow in push button menu. Task-number: QTBUG-49374 Task-number: QTBUG-65237 Task-number: QTBUG-65238 Change-Id: If68c2fae7472def3c19636483af741ca8ed2c490 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
| | * QMacStyle: CE_Splitter is HITheme-freeGabriel de Dietrich2018-01-242-7/+31
| | | | | | | | | | | | | | | | | | Change-Id: I96a5ba5d685d1b8f95fd11489e4e95096d0fa9a4 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * QMacStyle: declare block in drawNSViewInRect() as noescapeGabriel de Dietrich2018-01-242-2/+2
| | | | | | | | | | | | | | | Change-Id: Ida67a963ab62c6b974eceeaf9d386b941f357798 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * QMacStyle: PE_FrameLineEdit is HITheme-freeGabriel de Dietrich2018-01-242-30/+20
| | | | | | | | | | | | | | | | | | | | | | | | CT_LineEdit is as well, so that makes QLineEdit free of HITheme APIs. Change-Id: Ia02ce9f1003e5ae9c8bf47dab9ada030feca98ba Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | QMacStyle: Fix crash when using Freetype font engineGabriel de Dietrich2018-02-091-24/+26
|/ / | | | | | | | | | | | | | | | | This amends cf7a4016a17615df2952389bae11149a49b151bc. Change-Id: I8bb3e934d10b2f522539b73ceaa80a9a4608ef12 Task-number: QTBUG-66248 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | QMacStyle: Remove call to HIThemeDrawSeparatorGabriel de Dietrich2018-02-051-12/+6
| | | | | | | | | | | | | | | | It looked inverted for some reason. A single line looks better than before. Change-Id: Icb214b44ddcc6e9e57fe12e7b4c3f512a5f66452 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | QMacStyle: CE_DockWidgetTitle is now HITheme-freeGabriel de Dietrich2018-02-051-67/+30
| | | | | | | | | | Change-Id: Id2e23d37e9b87f89fc40e0d774c628eec91a986e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | QMacStyle: QMdiSubWindow is now HITheme-freeGabriel de Dietrich2018-02-052-228/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a couple issues. Because the actual class for the buttons returned by +[NSWindow standardWindowButton: forStyleMask:] is private, we can't fully configure them as we could with HITheme. Therefore, we don't get the mouse hovered state and the zoom button will show the fullscreen arrow instead of the '+' icon. Hopefully, QMdiArea will go the way of the dodo soon enough. It is not a thing on macOS and it has been replaced by tabbed windows UI on most desktop apps. Change-Id: Ia581f72611ad0224f42657afbc4d9f94bf5e5a3a Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Introducing SH_SpinBox_ButtonsInsideFrameGabriel de Dietrich2018-02-051-35/+12
| | | | | | | | | | | | | | | | | | | | This is currently only used in QMacStyle since, on macOS, the spin-box buttons are always beside the line-edit. Hence, there is no need to tamper with the line-edit frame. Change-Id: I8ccfbab547fccae89a8ddeaeb7005cb17d5951e6 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | QMacStyle: CC_SpinBox is now HITheme-freeGabriel de Dietrich2018-02-051-31/+29
|/ | | | | | | | | | | | | | | | | | | | Bonus changes in this edition: * The focus frame shows only around the spin-box's line-edit, as it should. This requires getting access to the spin-box's line-edit, which we do by setting a property on the former. Notice that the stepper doesn't get focus. On this point, macOS is inconsistent (partly because there's no such thing as an NSSpinBox, and partly because spin-box buttons are a separate control), so we copy the same focus behavior as NSDatePicker. * We clean some QFocusFrame related dead code in QMacStyle::event(). Change-Id: I204ca2093d9db343c78f0420811dda35c463bbcd Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Set WA_MacShowFocusRect for checkbox, radio buttonGabriel de Dietrich2018-01-172-31/+90
| | | | | | | | | | | | | | | | | | This fixes small and mini checkbox and radio button focus rings since the previous HITheme removal patch (90c9370d5098db95). But also allows to properly draw the focus ring outside the widget's boundaries, as it's common in macOS. More importantly, we pave the way to use QFocusFrame for most widgets and, eventually, implement the focus ring animation. Finally, we tweak the spacing between the indicators and their respective label. Change-Id: I4bf7ac1a06ce924a043f0365e487777d0b20a104 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QMacStyle: checkbox, radio button are now HITheme-freeGabriel de Dietrich2018-01-161-44/+32
| | | | | | | | | | | | | This also fixes focus ring thickness on retina displays except for radio button, for which we don't allocate enough space around. Instead of going down the push button madness we currently have, we leave it as is (i.e., slightly truncated) until we can come up with a more sane solution regarding focus rings. Change-Id: Icd4aa2e08c2558768c91efd7d119879e249b052f Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QMacStyle: Use QPainter to draw focus ringGabriel de Dietrich2018-01-161-34/+21
| | | | | | | Using Core Graphics or AppKit has no real advantage. Change-Id: Ie7e2df23f8da6ca4798092a7c074bbb2f40e2b18 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QMacStyle: Draw CE_MenuItem text using AppKitGabriel de Dietrich2018-01-111-0/+30
| | | | | | | | | | | | | | We seem to induce QCoreTextFontEngine to draw text the wrong way in non-native QMenu popups. Here, we just delegate menu items' text rendering to AppKit. This is only a workaround pending a proper fix or better understanding of the aforementioned issue. Change-Id: I71088ebe2a534bebca2ad396b1ea6754be093f55 Task-number: QTBUG-65653 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QWindowsXPStyle: Speed up level window loop in helper winId()Friedemann Kleint2018-01-091-5/+4
| | | | | | | | | | | Rewrite the loop using QGuiApplication::allWindows() to avoid the creation of temporary containers by QApplication::topLevelWidgets() and expensive checks. Task-number: QTBUG-64072 Change-Id: I56ef29b12f7bcbe274f3e00a6007d75d33f22b10 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QWindowsXPStyle: Remove unused codeFriedemann Kleint2018-01-052-41/+0
| | | | | | | | Fixes a deprecation warning about QDesktopWidget::screenGeometry(). Change-Id: Ib56b2d3f62ddca60d84b4f626571b5e444304804 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>