summaryrefslogtreecommitdiffstats
path: root/src/plugins/styles
Commit message (Collapse)AuthorAgeFilesLines
* macOS 11: Fix positioning of focus frame around comboboxVolker Hilsheimer2021-06-181-4/+8
| | | | | | | Fixes: QTBUG-94069 Pick-to: 5.15 6.1 6.2 Change-Id: I09079726c96a41f628ae55724cfe53dbc225d358 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: close visible gap between tab bar base line and tabsVolker Hilsheimer2021-06-111-1/+1
| | | | | | | | | | | | | | | | Dock widgets enable the QTabBar::drawBase property, but the clip region left a gap of 3 pixels on each side between the base line and the tabs. Correct the size of the hole cut into the clip region accordingly. Visually tested on macOS 10.15.7 and macOS 11.2.1 using the dockwidgets and tabdialog example. As a drive-by, fix a spelling mistake in related documentation. Fixes: QTBUG-86362 Pick-to: 6.2 6.1 Change-Id: Iada027999467741d0590576ee4508e6f41fb056d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: render shortcuts in context menus correctly alignedVolker Hilsheimer2021-06-021-2/+18
| | | | | | | | | | | | | | | On macOS, shortcuts should be rendered along the imaginary line between the modifiers, and the key. The modifiers are right-aligned on the left side of that line, the key left aligned on the right side. Make an exception for multi-chord sequences, render those always left aligned. Pick-to: 6.1 Fixes: QTBUG-73990 Change-Id: Ie03f3f40278700bdfafbfca7aa52075825e20234 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: respect underline attribute in menu item fontsVolker Hilsheimer2021-05-271-2/+4
| | | | | | | | | | | When we draw menu item text with CoreText instead of QPainter, then we need to translate QFont::underline() explicitly to an entry in the attribute dictionary. Task-number: QTBUG-73990 Pick-to: 6.1 5.15 Change-Id: I7e0c258f7cf80a89b29517fa8122576342654de1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix coding style in android platform and style pluginsXing LinKun2021-03-311-1/+2
| | | | | Change-Id: Ic0a1150178c571ea0c20a045ad7520d23d6d878c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Don't draw scrollbar handle when there is no rangeAndy Shaw2021-03-181-1/+1
| | | | | | | | | If the minimum and maximum is set to be the same then we should not draw the handle. An empty groove should be shown instead. Pick-to: 6.1 6.0 5.15 Change-Id: Ie79f55cd761f9a8f614967c40c23a7f59e700a0f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Redundant condition: widgetHuang Jie2021-03-041-1/+1
| | | | | | | | | Redundant condition: widget. '!widget || (widget && widget->isEnabled())' is equivalent to '!widget || widget->isEnabled()' Pick-to: 6.1 Change-Id: Ife915bd5ea66f8ccff48a1612f8c78c263075c89 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* cmake: Don't give plugins PUBLIC usage requirementsCraig Scott2021-02-243-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The pro2cmake.py conversion script faithfully reproduced the .pro files for the plugins, which specified the libraries as public. But in CMake, the implications of this are that public usage requirements should then be propagated to consumers. We don't expect any consumers, since a plugin is created as a MODULE library in CMake, so for Windows we don't even have an import library to link with. The only exception to this is for static builds where plugins are created as STATIC libraries instead, but only in certain controlled situations do we then link to plugins. Even then, usage requirements are not expected to propagate to the consumers, so these relationships should always be specified as private. This change warns on any PUBLIC usage requirements specified for a plugin. This check is disabled by default to avoid spamming CI builds for repos that haven't been fixed yet. The check can be enabled by a CMake cache option, which is intended for developers to use locally when fixing this issue in other repos (all plugins in qtbase should not trigger this warning as a result of changes in this commit). Task-number: QTBUG-90819 Pick-to: 6.1 Change-Id: I09f2c8da77db1193ad3370f85d367dfc6ab7b9a6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Unbreak binary compatibility in QStyleOptionHeaderVolker Hilsheimer2021-02-191-2/+4
| | | | | | | | | | | | | | | | | 4d943846128118e1b9932a17ce6f977a0f4127a5 introduced a new data member to QStyleOptionHeader, and reduced the size of the orientation member. This changed the binary layout of class instances, and breaks ABI. 180c662b0790c6eceffdcb4661681d7df1541a2d added another member within the new bitfield. Introduce a new QStyleOptionHeaderV2 class instead with the new members, and use that in QHeaderView, and the styles using the new members. Fixes: QTBUG-91224 Pick-to: 6.1 Change-Id: I47e6841e6652e4b67f247b7b4514e90be5609156 Reviewed-by: David Faure <david.faure@kdab.com>
* Fix compiler warnings for QFontMetrics useAssam Boudjelthia2021-02-041-1/+1
| | | | | | Pick-to: 6.1 6.0 Change-Id: I4c416280cef8c316258817184e94962c250370da Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* control scrolling of QTabBar using StyleHintSophie Kums2021-01-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mouse wheel/touchpad scroll signals sent to the tab bar trigger cycling through the tabs. In applications where the tab bar is close to "mouse click hotspots", the cursor may accidentally be left over the tab bar instead of the main content of the window. When the user wants to scroll up/down the main conten, the scroll signals are thus sent to the tab bar and instead of scrolling, the focus switches to another tab. This is confusing to the user, because not only does the application not carry out the desired action (scrolling through the main content), it jumps to a different tab. Two common examples of applications affected by this nuisance are Konsole and any kind of browser (file browser or web browser), where the address bar is right below the tab bar. Moreover, on macOS, scroll events do not have an effect on the tab bar widget of the native UI. Currently, the code makes use of preprocessor directives to achieve consistent behavior on macOS (`#ifndef Q_OS_MAC`). This patch implements the check of a StyleHint in order to determine if scroll events on the tabbar should have an effect. This approach is more consistent with Qt coding style than OS-dependent preprocessor directives and, in addition, makes the behavior configurable according to the user's preferences. [ChangeLog][QtWidgets][QStyle] Added SH_TabBar_AllowWheelScrolling as a style hint to enable/disable cycling through tabs using the scroll wheel. This defaults to true in all styles except the macOS one so there is no change in existing behavior. Change-Id: I99eeb5a1aab03cbc574fac7187d85a8a2d60cf34 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* macOS: Add more padding to width of non-editable comboboxesVolker Hilsheimer2021-01-131-2/+2
| | | | | | | | | | | | | | | The width of the combobox took the space for the checkmark and the contents into account, but didn't provide any padding on the right side, resulting in the text hitting the right side of the combobox popup. Add another 12 pixels padding to the sizeFromContents implementation, which results in a symmetrical padding on both sides of the text. Fixes: QTBUG-88715 Pick-to: 6.0 5.15 Change-Id: I811da73d11ce935c1fb83efabbe799f9a882e1d7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Remove .prev_CMakeLists.txt filesJoerg Bornemann2021-01-122-34/+0
| | | | | | | | | | Those serve no purpose anymore, now that the .pro files are gone. Task-number: QTBUG-88742 Change-Id: I39943327b8c9871785b58e9973e4e7602371793e Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-074-63/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Make QPushButton on macOS use QFocusFrame to fix alignment problemsDoris Verria2020-12-211-33/+93
| | | | | | | | | | | | | | Alignment problems occur for pushbuttons because they appear smaller then their actual widget geometry, which is used for their alignment in layouts. To fix, shift the pushbutton's rect to the left, adjust SE_PushButtonLayoutItem accordingly and use QFocusFrame to render the focus frame ring outside the widget's paintable area. Fixes: QTBUG-89133 Fixes: QTBUG-81452 Pick-to: 5.15 6.0 Change-Id: Iee885a4fb3674d966e5ff3b5c04a0845521b2d72 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QHeaderView: respect the font role while calculating the elided textChristian Ehrlicher2020-12-101-1/+4
| | | | | | | | | | | | | Amends 4d943846128118e1b9932a17ce6f977a0f4127a5: - The macOS style must now elide the text by it's own since it is no longer done by QHeaderView - Add documentation of QStyleOptionHeader::textElideMode - Remove unused variables from QHeaderView::initStyleOptionForIndex() Task-number: QTBUG-86426 Change-Id: I98fc6771c0cd56d6002390125ffbab1269f6dd39 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Re-generate project files in srcJoerg Bornemann2020-11-301-0/+23
| | | | | | Pick-to: 6.0 Change-Id: I1f5f822d68129490f1a7c495f718aead0b520ca9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QMacStyle - remove vertical adjustment for inactive tabTimur Pocheptsov2020-11-301-2/+0
| | | | | | | | | | While it worked as expected with beta, with final release this thing looks wrong again, especially in the dark mode. Pick-to: 5.15 Pick-to: 5.12 Change-Id: I6857344de897e0f39d9d8e66431635dbe2f4d077 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Fix build of plugins/styles/mac using PCHCristian Adam2020-11-201-0/+7
| | | | | | | | | | | | | | If a target inherits precompile headers from a different target that has more languages enabled (CXX, OBJCXX), the target will depend on PCH artifacts for a language that is not actually present. Ammends d9d137c8f39b8aa77b28b12fcb6f1642ca650291 Fixes: QTBUG-88609 Pick-to: 6.0.0 6.0 Change-Id: I9735317e634b62732df0fce84fe7cf229cfdea1b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QFont: Prefer setFamilies() over setFamily()Andy Shaw2020-11-201-2/+2
| | | | | | | | | | | | | | | | By depending on setFamilies() then we can be sure that font names with spaces, commas, quotes and so on are correctly handled without being misinterpreted. For now it will split on the comma when a string containing one is passed to setFamily. But from Qt 6.2 this will be removed to preserve the family string as a convenience function. [ChangeLog][QtGui][QFont] Indicated that setFamilies/families is preferred over setFamily/family to ensure that font family names are preserved when spaces, commas and so on are used in the name. Change-Id: Id3c1a4e827756a4c928fed461a4aafa5a0f06633 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Adjust code format, add space after 'if'Zhang Sheng2020-11-163-13/+13
| | | | | | Change-Id: Ice081c891ff7f4b766f49dd4bd5cf18c30237acf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* QChar: make construction from integral explicitGiuseppe D'Angelo2020-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QChar should not be convertible from any integral type except from char16_t, short and possibly char (since it's a direct superset). David provided the perfect example: if (str == 123) { ~~~ } compiles, with 123 implicitly converted to QChar (str == "123" was meant instead). But similarly one can construct other scenarios where QString(123) gets accidentally used (instead of QString::number(123)), like QString s; s += 123;. Add a macro to revert to the implicit constructors, for backwards compatibility. The breaks are mostly in tests that "abuse" of integers (arithmetic, etc.). Maybe it's time for user-defined literals for QChar/QString, but that is left for another commit. [ChangeLog][Potentially Source-Incompatible Changes][QChar] QChar constructors from integral types are now by default explicit. It is recommended to use explicit conversions, QLatin1Char, QChar::fromUcs4 instead of implicit conversions. The old behavior can be restored by defining the QT_IMPLICIT_QCHAR_CONSTRUCTION macro. Change-Id: I6175f6ab9bcf1956f6f97ab0c9d9d5aaf777296d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QMacStyle - more pixel refinementsTimur Pocheptsov2020-10-281-0/+18
| | | | | | | | | | | | There is 1 pixel of a rounded corner visible both on NSButton and NSPopupButton in a tab widget (all orientations) - adjust the rectangle for this. Pick-to: 5.15 Pick-to: 5.12 Task-number: QTBUG-86513 Change-Id: I5e203adc583d2fba6323b18328ccbc8b0c0666ea Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QMacStyle - fix tab renderingTimur Pocheptsov2020-10-261-1/+17
| | | | | | | | | | | In BigSur NSPopupButton, it would appear, is slightly different. But different enough so that a fragment of a disclose 'arrow' button became visible within the clipping region, making it appear as some blue strange thing in between inactive (non-selected) tabs. Task-number: QTBUG-86513 Change-Id: Ib03af48069056b5ecbb8b4afebd851005583293a Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QWindowsXPStyle: Remove unused variablesTor Arne Vestbø2020-10-201-2/+0
| | | | | Change-Id: Ide3880114bf8d779571b7cf1235ae95524950e5d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove misleading commentTimur Pocheptsov2020-10-161-6/+0
| | | | | | | | NSSegmentedControl is not of much use for us, due to different problems it shows when rendered. Change-Id: I57be237b33c226d0a84d18c76a4bffb92cea5274 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove dead codeLars Knoll2020-10-121-3/+3
| | | | | | | This code has been deprecated in Qt 5. Change-Id: Ia8e0bc791ac1f43df7124b4f30db3d0bb9966015 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Enable the Android style plugin for the cmake buildLars Knoll2020-10-122-1/+21
| | | | | | Change-Id: Ie6a82c47c92067fb22270891bb81cd75ed3c9212 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Windows Vista/XP Styles: Remove XP-specific codeFriedemann Kleint2020-10-091-410/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WindowsXPStyle cannot be instantiated via style factory since 5.0. The derived class QWindowsVistaStyle still uses much of its code, though. Remove the XP-specific code as determined by - Adding debug output with the enums added to WindowsXPStyle's functions - Run the widgets gallery example in Vista style - Run the widgets gallery example in XP style - From the lines not appearing in both logs (comm -3), remove the code present in WindowsXPStyle drawComplexControl() QStyle::CC_ComboBox drawComplexControl() QStyle::CC_ScrollBar drawComplexControl() QStyle::CC_SpinBox drawControl() QStyle::CE_ComboBoxLabel drawControl() QStyle::CE_HeaderSection drawControl() QStyle::CE_ProgressBarContents drawControl() QStyle::CE_PushButtonBevel drawPrimitive() QStyle::PE_FrameLineEdit drawPrimitive() QStyle::PE_IndicatorBranch drawPrimitive() QStyle::PE_IndicatorProgressChunk drawPrimitive() QStyle::PE_PanelItemViewItem drawPrimitive() QStyle::PE_PanelLineEdit sizeFromContents() QStyle::CT_SpinBox standardIcon() QStyle::SP_CommandLink standardPixmap() QStyle::SP_ArrowRight standardPixmap() QStyle::SP_CommandLink styleHint() QStyle::SH_Header_ArrowAlignment Change-Id: Ic6a19cabf39d1089328a7cb1afdc282a60a7cf21 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Another round of replacing 0 with nullptrAllan Sandfeld Jensen2020-10-074-36/+36
| | | | | | | | | This time based on grepping to also include documentation, tests and examples previously missed by the automatic tool. Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Rename the new platform APIs from QPlatformInterface to QNativeInterfaceTor Arne Vestbø2020-10-071-1/+1
| | | | | | | | | | | | We were already using the 'native' nomenclature when referring to these kinds of APIs, e.g. when talking about native handles, or the existing QPlatformNativeInterface on a QPA level. Using 'native' for the user facing APIs also distinguishes them from the 'platform' backend layer in QPA and elsewhere. Change-Id: I0f3273265904f0f19c0b6d62471f8820d3c3232e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* macOS: Update slider metrics by explicitly asking it to layoutTor Arne Vestbø2020-10-061-33/+4
| | | | | | | Pick-to: 5.15 Pick-to: 5.12 Change-Id: I283771624b513f4e8844c6130898ddf2531df0f1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Windows Vista/XP Styles: Clean up some codeFriedemann Kleint2020-09-265-67/+10
| | | | | | | | | Remove public constructor of QWindowsXPStyle since it cannot be instantiated via style factory since 5.0. Remove overridden functions that merely call the base implementation. Change-Id: I3b2998115c4ab65fabf3744874bc3a69a1f5e5b0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Don't assume NSSlider is never flippedTor Arne Vestbø2020-09-231-7/+7
| | | | | | | | | | | | | | We need to take into account the possibility that the slider is flipped, otherwise we end up with inverted rects, as noticed in Big Sur. The logic to use the ticks as input to whether the bar rect should be inverted didn't make sense. If the graphics context has been flipped, then we should reflect that through the slider. Pick-to: 5.15 Pick-to: 5.12 Change-Id: I3574027c14807460affb42a9763211981c4ed528 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macos: Rename macos style to macOSRichard Moe Gustavsen2020-09-112-2/+2
| | | | | | | | | This change shouldn't matter much to widgets, since style names there are case insensitive. But for controls style names are case sensitive, and in that case, "macOS" looks more correct. Change-Id: Ia1d442bce465692ff58fecba1cc68ecbb2e52549 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Port from devicePixelRatioF() to devicePixelRatio()Morten Johan Sørvig2020-09-102-4/+4
| | | | | | | This ports all of QtBase. Change-Id: If6712da44d7749b97b74f4614a04fac360f69d9e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QStyle: remove deprecated SH_SpellCheckUnderlineStyleChristian Ehrlicher2020-09-051-3/+0
| | | | | | | | It was deprecated with 88e6f8cff2974c46b1262f3a1a61e1440c664e0c and is not used anywhere anymore so it can be safely removed. Change-Id: If4050ac8bf116fb31491b3b08096554c5ea3e4d5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Vista Style: Fix pixelized arrow of QCommandLinkButton with scalingFriedemann Kleint2020-09-021-1/+1
| | | | | | | | | | | Do not unnecessarily downscale the pixmap; QIcon will set the correct device pixel ratio. Pick-to: 5.15 Task-number: QTBUG-86344 Change-Id: I04ba93ec3003d3dfd458b032cc5c8fc9cf38e957 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Vista style: Fix pixelized elements after focus/activationFriedemann Kleint2020-09-021-1/+2
| | | | | | | | | | Use a float device pixel ratio in the style animations and default to the application's device pixel ratio. Pick-to: 5.15 Task-number: QTBUG-86344 Change-Id: I093bfefc0f544eb488da0993a183f92c9c77a286 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Remove QStyleOptionProgressBar::orientation memberVolker Hilsheimer2020-08-294-21/+20
| | | | | | | | | Address ### Qt 6 comment; the information is already stored in the state variable, using the QStyle::State_Horizontal bit. Change-Id: I61d143ba057776f9d622793a0592b5dd4726f25d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Port QtBase to the new QIcon::pixmap() APIMorten Johan Sørvig2020-08-291-13/+8
| | | | | | | | | | | | | | The target devicePixelRatio can now be passed to the pixmap() function, instead of a QWindow pointer. This allows us to remove some usage of the QWidget pointer in the styles, since the DPR is accessible from the passed in painter. The QWidget pointer is still used in places where we don't have a painter. Task-number: QTBUG-85885 Change-Id: Ifecc669f5bad655e289a936d71bafe02605f21a4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Rename QStyleOptionMenuItem::tabWidth to reservedShortcutWidthVolker Hilsheimer2020-08-273-3/+3
| | | | | | | As per ### Qt 6 comment, and the documentation for the variable. Change-Id: I58df784a72129dc97c5f13eb54e34cb7feb9748c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Mark some Qt namespace enum members properly as deprecatedEdward Welbourne2020-08-271-3/+0
| | | | | | | | | | | | | | | | A comment is not good enough, Some of the enum members were even still in use, or mentioned in documentation. WA_ContentsPropagated, WA_WState_DND and WA_ForceAcceptDrops have been deprecated since 4.5.1; and at least the last has been an \omitvalue in the docs for even longer. (WA_ShowModal and WA_GroupLeader have been similarly marked, but are in use, see QTBUG-85816.) Push back to 5.15.1 in order to be able to remove these at Qt 6. Pick-to: 5.15.1 Change-Id: I6ea3839767e5f5158b0fed508f65798470191908 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: rename 'macintosh' style to 'macos'Richard Moe Gustavsen2020-08-263-3/+3
| | | | | | | | | | | | | | Change the name/key of the style to 'macos'. Besides the name 'macintosh' being archaic, we also need this change to avoid creating 'macintosh' style folders in QtQuickControls, now that we plan to use QPlatformTheme also there to resolve the style. [ChangeLog][Widgets][QStyle] The 'macintosh' style has been renamed to 'macos'. Change-Id: I14b8a8b4dbd369e7a7d16b94e4ad27e501e7e8d0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Rename confusingly named QFont/QPalette::resolve overloadsVolker Hilsheimer2020-08-251-2/+2
| | | | | | | | | | | | | | | Having three methods with the same name doing different things is unnecessarily confusing, so follow the standard naming convention in Qt and call the getter of the resolve mask resolveMask, and the setter setResolveMask. These methods were all documented as internal. The publicly documented resolve() method that merges two fonts and palettes based on the respective masks remains as it is, even though 'merge' would perhaps be a better name. Change-Id: If90b1ad800834baccd1dbc38fc6b861540d6df6e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Properly deprecate Qt::MidButton in favor of Qt::MiddleButtonEdward Welbourne2020-08-221-1/+1
| | | | | | | | | | | | MidButton had its // ### Qt 5: remove me upgraded to Qt 6 at 5.0; but it dates back to 4.7.0 Replace the many remaining uses of MidButton with MiddleButton in the process. Pick-to: 5.15 Change-Id: Idc1b1b1816673dfdb344d703d101febc823a76ff Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Windows QPA: Move some internal functions to the new interfaceFriedemann Kleint2020-07-281-14/+8
| | | | | | | | | | | | | Move createMessageWindow(), the GPU detection for qtdiag and the async expose setting (used by Active Qt) from QWindowsNativeInterface to QWindowsApplication. Remove unused registerWindowClass() and use logFontToQFont() directly from the font database. Task-number: QTBUG-83252 Change-Id: I9c72351970b47457d08125557c2580016c66e586 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Use QList instead of QVector in pluginsJarek Kobus2020-07-063-7/+7
| | | | | | Task-number: QTBUG-84469 Change-Id: Ic86f4a3000592a1c9ae62e4a83f4fe39832a6b24 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add keyboardModifiers member to QStyleOptionSlider, and use it for macVolker Hilsheimer2020-07-021-1/+2
| | | | | | | | | | Gets rid of a call to QApplication::keyboardModifiers in a method that is anyway only called from an input event handler, where we have that information already. Task-number: QTBUG-73829 Change-Id: I81753d6bf725e9db4918d831fac5b03a0b1940b9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QMacStyle - draw inverted vertical slider correctlyTimur Pocheptsov2020-07-021-1/+12
| | | | | | | | | | Without double-inverting it (and having a knob and the blue filling mirroring each other relative to the center of the slider's bar). Pick-to: 5.15 Fixes: QTBUG-85342 Change-Id: I4f0e8dd6d76e5e078a2db5c2ca63ba6bb2a661ed Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>