summaryrefslogtreecommitdiffstats
path: root/src/plugins/styles
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Merge branch '5.11' into dev" into refs/staging/devEdward Welbourne2018-07-311-0/+2
|\
| * Merge branch '5.11' into devEdward Welbourne2018-07-311-0/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakebuiltins.cpp src/plugins/platforms/windows/qwindowstabletsupport.h src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp Done-With: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I000b0eb3cea2a5c7a99b95732bfdd41507cf916e
| | * QMacStyle: Configure checkbox NSButton as tri-stateGabriel de Dietrich2018-07-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Qt allows this as a property of QCheckBox, so it should be enabled in its Cocoa counterpart. Change-Id: I88eb6dddabb173050c4fe7229f15c768181ef527 Task-number: QTBUG-69453 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | QMacStyle: Make helper-NSViews layer-backedTor Arne Vestbø2018-07-311-5/+31
|/ / | | | | | | | | | | | | | | | | | | | | | | This prevents the view from triggering display of its superview when being temporarily added, which is both inefficient and causes issues when those dirty-rects are wrong due to the wrong frame position of the added view. Task-number: QTBUG-67998 Task-number: QTBUG-68023 Change-Id: Idc87d0540216e2e39cc84cc57cb818110c9d00e2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | QMacStyle: Remove handling of defunct _q_styleObjectWindow propertyTor Arne Vestbø2018-07-301-12/+3
| | | | | | | | | | | | | | | | | | | | It was supposed to be used in Qt Quick Controls 1, for the desktop style, but the followup patches in QQC1 never landed, and QQC1 is now deprecated. Change-Id: Iceefd523fc02a9e48b986dc33bb13a41804dd199 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | QMacStyle: Normalize how we call drawNSViewInRectTor Arne Vestbø2018-07-231-13/+9
| | | | | | | | | | Change-Id: I351635c7cc0bb8c852626dc3c0a3caf33b25a761 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-07-022-25/+10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_dragging.mm src/plugins/platforms/ios/qiosinputcontext.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/tools/androiddeployqt/main.cpp Was moved from qttools into qtbase in 5.11. So re-apply 32398e4d here. tests/auto/corelib/global/qlogging/test/test.pro tests/auto/corelib/global/qlogging/tst_qlogging.cpp tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp tests/auto/corelib/thread/qthreadstorage/test/test.pro tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qapplication/test/test.pro Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Done-with: Oliver Wolff <oliver.wolff@qt.io> Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
| * QWindowsFontDatabase/QWindowsXPStyle: Fix compilation with g++ 8.1/MinGWFriedemann Kleint2018-06-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Silence warnings about copying/clearing memory types which g++ considers non-trivial, for example: windows\qwindowsfontdatabase.cpp:1003:75: error: 'void* memcpy(void*, const void*, size_t)' copying an object of non-trivial type 'class QChar' from an array of 'const ushort' {aka 'const short unsigned int'} [-Werror=class-memaccess] memcpy(faceNamePtr, faceName.utf16(), sizeof(wchar_t) * nameLength); qwindowsxpstyle.cpp:946:46: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct ThemeMapData'; use assignment or value-initialization instead [-Werror=class-memaccess] memset(&data, 0, sizeof(data)); ^ qwindowsxpstyle.cpp:1053:38: error: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct ThemeMapData'; use assignment or value-initialization instead [-Werror=class-memaccess] memset(&data, 0, sizeof(data)); by introducing a cast. Task-number: QTBUG-68742 Task-number: QTQAINFRA-2095 Change-Id: I160eb5fc7b64a2bc404e1fa61d306af2662d1252 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Access private properties via sandbox-safe API on Apple OSesTor Arne Vestbø2018-06-141-23/+8
| | | | | | | | | | | | | | | | | | | | We detect whether or not we're running inside a sandbox and bail out if so. We use runtime lookup of the property, so that static analysis of the application will not mistakenly think we're using the API in sandboxed situations. Change-Id: I5f5c42f5a4a44b62de061d945b62ac63167ece09 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-06-071-7/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/kernel/qeventdispatcher_cf.mm src/gui/kernel/qguiapplication_p.h src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/ios/qioseventdispatcher.mm src/plugins/platforms/windows/qwindowsdrag.h src/plugins/platforms/windows/qwindowsinternalmimedata.h src/plugins/platforms/windows/qwindowsmime.cpp src/plugins/platforms/winrt/qwinrtscreen.cpp Change-Id: Ic817f265c2386e83839d2bb9ef7419cb29705246
| * QMacStyle: Fix clipped arrow in QToolButtonGabriel de Dietrich2018-06-041-4/+8
| | | | | | | | | | | | | | | | | | | | | | A quick and reasonable fix is to make sure the arrow fits in SC_ToolButtonMenu returns. In the future, we should keep the arrow's actual size and offset the icon accordingly. Change-Id: I218fa7726efbe4576a72889c41685de87ac14ac1 Task-number: QTBUG-68517 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * QMacStyle: Fix QComboBox left contents marginGabriel de Dietrich2018-06-041-3/+3
| | | | | | | | | | | | | | Change-Id: I89a5e0c271bdaced8440e123c63c5435fa725856 Task-number: QTBUG-68518 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-241-1/+0
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_common.prf src/corelib/tools/qstring.cpp src/plugins/platforms/windows/qwindowsmousehandler.cpp src/widgets/widgets/qmainwindowlayout_p.h Change-Id: I5df613008f6336f69b257d08e49a133d033a9d65
| * QMacStyle: remove unused qlibrary.h includeJ-P Nurmi2018-05-151-1/+0
| | | | | | | | | | | | | | | | Fixes build with -no-feature-library, because the qlibrary.h header contains QT_REQUIRE_CONFIG(library). Change-Id: If64ece8bd77e8824b86dc91f95dd9062cb2a1644 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | 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>