summaryrefslogtreecommitdiffstats
path: root/src/plugins/styles/mac
Commit message (Collapse)AuthorAgeFilesLines
* styles: Fix typos in source code commentsJonas Kvinge2021-10-121-6/+6
| | | | | Change-Id: If0f140f4ad02395bd0dd5eee08f90318d3a7e930 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Use new QPlatformTheme::appearance() functionMitch Curtis2021-09-171-20/+21
| | | | | | | | Instead of qt_mac_applicationIsInDarkMode(). Task-number: QTBUG-94859 Change-Id: Ib64c081adfafb2843a7593d0e35668cce70cffd0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Port to QImage and QPixmap deviceIndependentSize()Morten Sørvig2021-09-011-13/+13
| | | | | | | | | Replace the “size() / devicePixelRatio()” pattern with a call to deviceIndependentSize(). Change-Id: I9d9359e80b9e6643e7395028cd43e3261d449ae7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Rename qt6_add_plugin TYPE option to PLUGIN_TYPEAlexandru Croitor2021-08-061-1/+1
| | | | | | | | | | | | | The intention is to remove TYPE as a keyword completely before 6.2.0 release, but in case if that's not possible due to the large amount of repositories and examples, just print a deprecation warning for now and handle both TYPE and PLUGIN_TYPE. Task-number: QTBUG-95170 Pick-to: 6.2 Change-Id: If0c18345483b9254b0fc21120229fcc2a2fbfbf5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* macOS: fix drawing of pushbuttons of non-standard sizeVolker Hilsheimer2021-07-091-25/+36
| | | | | | | | | | | | | | | | | | | | | | Cocoa renders the bevel of a push button always in the default height of 32 pixels. We handled the case that the button is larger than that by switching to "squared" mode, but buttons that are smaller than that got rendered incorrectly, with the bevel being clipped. Fix this by always rendering buttons in "squared" mode when the height of the widget is not the same as the standard. Adjust the default height for "mini" push buttons based on visual testing. Make the equivalent adjustment to the focus frame logic and general positioning so that buttons and frames are centered compared to other controls. As a drive-by, get rid of expensive QObject::inherits calls, and replace with qobject_cast. The headers for all the relevant widget types are already included. Fixes: QTBUG-85972 Pick-to: 6.2 Change-Id: I4ad66fac2313fbee385c1eadcc243f69c9cace70 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS 10.15: Fix focus frame for combo boxesVolker Hilsheimer2021-07-061-0/+2
| | | | | | | | | | | | | | Amends df316963213e765de5b94469622df48b0c9a9e6e to take care of macOS 10.15 specifically, where the focus ring is a pixel too high and leaves a gap that's visible on high-dpi displays. On macOS 10.14 and before, and for editable comboboxes, the focus frame is correct. Fixes: QTBUG-94069 Pick-to: 6.2 6.1 5.15 Change-Id: I278aa30036808c06f8e71385d4797315e46d8f1d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* 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>
* 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>
* cmake: Don't give plugins PUBLIC usage requirementsCraig Scott2021-02-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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-121-23/+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-071-19/+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>
* Adjust code format, add space after 'if'Zhang Sheng2020-11-161-9/+9
| | | | | | 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>
* 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>
* Another round of replacing 0 with nullptrAllan Sandfeld Jensen2020-10-072-17/+17
| | | | | | | | | 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>
* 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>
* 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-101-2/+2
| | | | | | | 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>
* Remove QStyleOptionProgressBar::orientation memberVolker Hilsheimer2020-08-291-1/+1
| | | | | | | | | 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-271-1/+1
| | | | | | | As per ### Qt 6 comment, and the documentation for the variable. Change-Id: I58df784a72129dc97c5f13eb54e34cb7feb9748c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@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>
* 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>
* Use QList instead of QVector in pluginsJarek Kobus2020-07-061-2/+2
| | | | | | 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>
* QMacStyle - stop using the deprecated APITimur Pocheptsov2020-06-301-3/+0
| | | | | | | | | | | | | | | Namely, -calcSize method of NSControl (we're calling it for NSSlider). The documentation recommends overriding -layout instead, but we don't inherit NSSlider thus cannot override anything. Also, he documentation says that -calcSize call its cell's -calcDrawInfo: if needed. The default -calcDrawInfo: in NSCell is documented to be a noop and it would appear NSSliderCell does not override it. Thus we remove this call. Pick-to: 5.15 Change-Id: Ic3e8bf742b50528a0616fb73494ec340fcd57e25 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Port Q_STATIC_ASSERT(_X) to static_assertGiuseppe D'Angelo2020-06-191-1/+1
| | | | | | | | | | | | | | | | | There is no reason for keep using our macro now that we have C++17. The macro itself is left in for the moment being, as well as its detection logic, because it's needed for C code (not everything supports C11 yet). A few more cleanups will arrive in the next few patches. Note that this is a mere search/replace; some places were using double braces to work around the presence of commas in a macro, no attempt has been done to fix those. tst_qglobal had just some minor changes to keep testing the macro. Change-Id: I1c1c397d9f3e63db3338842bf350c9069ea57639 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix breakage of QPushButton on macOS when a style sheet was setVolker Hilsheimer2020-06-111-8/+6
| | | | | | | | | | | | | | | | | | | | | Amends comment 6e1d70ae12baae4610356ec7b69635ad75a97b4e, which introduced SE_PushButtonBevel so that QPushButton could ignore clicks outside of the button's bevel. In the macOS style, make sure that the framerect we pass to NSButton::alignmentRectForFrame is the rect we receive from QPushButton in the style options. The frame property of the shared NSButton* object might not be initialized. In the style sheet style, handle SE_PushButtonBevel the same ways as Contents and FocusRect, as it is not a separately styleable property. Change-Id: I12eb1b046c864a02b34d276e6352e2e16d44231e Fixes: QTBUG-84852 Fixes: QTBUG-84879 Task-number: QTBUG-81452 Pick-to: 5.15 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* macOS: Fix use of deprecated NSOffStateTor Arne Vestbø2020-05-271-1/+1
| | | | | | Pick-to: 5.15 Change-Id: Ic799c52350f99a14f57efa9907db772d19264ca2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-05-041-2/+8
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/text/qlocale.cpp src/network/access/qnetworkaccessmanager.cpp Regenerated tests/auto/testlib/selftests/float/CMakeLists.txt Change-Id: I5a8ae42511380ca49a38b13c6fa8a3c5df8bed01
| * QMacStyle - change the arrow type only for 'OnlyOneTab' optionTimur Pocheptsov2020-04-291-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It appears the hack was not needed when we have several tabs (popup button works as expected). Otherwise, this button suddenly has a different size: it's bigger when selected and smaller if not (and the holes clipped under the tab shape are becoming quite visible in the dark mode to the left and right of a tabbar). For the single tab we need some adjustment in the size not to have visible difference between inactive/selected tab. Fixes: QTBUG-83216 Change-Id: I52511e610ae7b36f261e0218b7e432e747bc9491 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | CMake: Regenerate projects to match updated plugin APILeander Beernaert2020-04-271-1/+1
| | | | | | | | | | Change-Id: Iafe0a953e74d7f36ec48fa075b3725dd6466c5e3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Remove deprecated QStyle enum valuesVolker Hilsheimer2020-04-161-1/+1
| | | | | | | | | | Change-Id: I7eba336017844c06b2976df53d440e167abd7894 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | QApplication: remove obsolete globalStrut functionalityVolker Hilsheimer2020-04-101-1/+1
| | | | | | | | | | | | Change-Id: If56873f86f5291264cac720f8db7dbd4db756f49 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>