summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoatheme.mm
Commit message (Collapse)AuthorAgeFilesLines
* Add AA_DontUseNativeMenuWindowsMitch Curtis2024-03-151-3/+9
| | | | | | | | | | | | | | | Also add some categorized logging output to make it easier to check if native menus are being created. [ChangeLog][Qt Core] Added AA_DontUseNativeMenuWindows application attribute. Menu popup windows (e.g. context menus, combo box menus, and non-native menubar menus) created while this attribute is set to true will not be represented as native top level windows, unless required by the implementation. Task-number: QTBUG-69558 Change-Id: Iba11b89c67d942ce6c5a28a7c57a86e63c020618 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QIcon: turn platform engines on by defaultVolker Hilsheimer2023-12-071-4/+1
| | | | | | | | | | | | | | | | | | | | | | They are used when an icon is constructed via QIcon::fromTheme, unless an application-defined theme provides the requested icon. Update the documentation. For now we don't provide a way to "opt out". This might change, depending on the feedback during the Qt 6.7 beta phase. [ChangeLog][QtGui][QIcon] Qt now has implementations of native icon engines for macOS, iOS, Windows 10, Windows 11, and Android. These engines provide access to the native icon libraries and fonts, mapping standard icons to the corresponding native icon asset. Icons from application-defined themes take precedence, but the last-resort fallback icon passed as the second parameter into the QIcon::fromTheme(QString, QIcon) overload is only used if the icon is not available from the native library. See the QIcon documentation for details. Change-Id: I618e5c137c40f8e6309c0e4d4219a5a2759a475d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add initial implementation of macOS and iOS icon theme implementationsVolker Hilsheimer2023-11-231-13/+11
| | | | | | | | | | | | | | | | | | | | | | | From macOS 13 on, AppKit provides an API to get a scalable system image from a symbolic icon name. We can map those icon names to the XDG-based icon names we support in Qt, and render the NSImage with palette-based coloring when needed, in an appropriate scale. On iOS, we can use the equivalent UIKit APIs. Coloring functionality is only available from iOS 15 on. Implement a QAppleIconEngine that does that in its scaledPixmap implementation. Use basic caching to store a single QPixmap version of the native vector image. We regenerate the pixmap whenever a different size, mode, or state is requested. Add a manual test for browsing all icons we can get from the various Qt APIs that: standard icons and pixmaps from QStyle, QPlatformTheme, and QIcon::fromTheme, in addition to showing all icon variations for a single QIcon. Task-number: QTBUG-102346 Change-Id: If5ab683ec18d140bd8700ac99b0edada980de9b4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CoreText: Resolve color scheme (dark mode) via the platform themeTor Arne Vestbø2023-09-081-1/+18
| | | | | | | | | | | | | | | We might be drawing glyphs outside the main thread, which triggers the main thread checker for our access to NSApplication from qt_mac_applicationIsInDarkMode(). Change the CoreText font engine to pull out this information from the theme instead, and teach the theme to only updates its color scheme on the main thread. Pick-to: 6.6 Change-Id: I02be713d9705c6e0c21107db7f7de039182f601d Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Rename accent color in QPaletteSanthosh Kumar2023-08-181-1/+1
| | | | | | | | | | Accent color role has been renamed according to name rule of other color roles in QPalette. Fixes: QTBUG-116107 Pick-to: 6.6 Change-Id: I70ac98a1e97afbdc7ea5f8d79f808c307e170712 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Platform theme: fill QPalette::AccentColor with OS valueYuhang Zhao2023-06-011-0/+3
| | | | | | | | | | | The AccentColor role, added in Qt 6.6, is currently populated with a default value. This patch implements populating the brush with OS values for Windows and macOS. Change-Id: Ic243c3b8664d50db3a2096a034de6ba672d9e2d2 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Rename Qt::Appearance to Qt::ColorSchemeTor Arne Vestbø2023-02-131-2/+2
| | | | | | | | | | | | Based on discussions in the 6.5 API review, where we concluded that 'appearance' is too general. Instead, we follow the CSS standard and use the term 'color scheme'. Pick-to: 6.5 Change-Id: I8ceaf4138ecadff5ccd962480e8e5beb39b556ec Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Jonas Kvinge <jonas@jkvinge.net> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Add dialog helper for native message boxesTor Arne Vestbø2022-11-151-6/+11
| | | | | | | | | | | | | | | | | The native implementation uses NSAlert, making a best effort to map the QMessageBox properties to the native dialog, falling back to the cross platform non-native dialog if the discrepancy is too big. The initial implementation focuses on the current state of the native dialog helper "protocol", but there's room for improvement here, which would allow even more dialog types and properties to be native. [ChangeLog][macOS] Message boxes such as QMessageBox now follow the platform look and feel by using native dialogs if possible. Change-Id: I4da33f99894194a7b301628cd1fbb44d646ddf18 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Reflect platform settings for double click and key repeat intervalsTor Arne Vestbø2022-09-291-0/+6
| | | | | | | | | | The KeyboardAutoRepeatRate is unfortunately exposed in QStyleHints as an int, so any rate below 1 event per second will not be reflected accurately. Pick-to: 6.2 6.4 Change-Id: I506762545a1838cf007320e73827def006f5f0c2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Replace QPlatformTheme::Appearance by Qt:AppearanceAxel Spoerl2022-09-201-2/+2
| | | | | | | | | | | | | With the introduction of Qt:Appearance, its predecessor in QPlatformTheme has become redundant. This patch replaces all occurrences of QPlatformTheme::Appearance with the new enum class. Task-number: QTBUG-106381 Change-Id: I5406f1b7c19f68571f074617c681318c96a6517e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Move QMacAutoReleasePool from qglobal.h to qcore_mac_p.hSona Kurazyan2022-09-011-0/+1
| | | | | | | | And include qcore_mac_p.h where needed. Task-number: QTBUG-99313 Change-Id: Idb1b005f1b5938e8cf329ae06ffaf0d249874db2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Ignore deprecation for ReleaseIconRefTor Arne Vestbø2022-08-151-1/+1
| | | | | | | | | There's no good replacement yet for our use of GetIconRef and ReleaseIconRef, so for now ignore the deprecation. Pick-to: 6.2 6.3 6.4 5.15 Change-Id: Iffcaa2af3c9e2ee053303a2272e8874913dd74d4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove unneeded @available check for macOS <= 10.14 and iOS <= 13Tor Arne Vestbø2022-08-051-33/+10
| | | | | | | | All versions down to Qt 6.2 require macOS 10.14 or iOS 13. Pick-to: 6.2 6.3 6.4 Change-Id: I5048921ea5a149346a0fa84228227d9156004675 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* darwin: Remove unneeded SDK version checks for older versionsTor Arne Vestbø2022-08-051-14/+0
| | | | | | | | | All versions down to 6.2 require at least Xcode 12, which ships with the macOS 11 SDK, and iOS 14 SDK. Pick-to: 6.4 6.3 6.2 Change-Id: I128321ec9e97b670b7c027f1233978e1b8856f88 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Ignore deprecation for kOnSystemDisk icon domainTor Arne Vestbø2022-07-051-1/+1
| | | | | | | | There's no good replacement yet, so for now ignore the deprecation. Pick-to: 6.2 6.3 6.4 5.15 Change-Id: I56928b73c47b677e3fdafd35cc5ae558e5285314 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Send ThemeChange event to all windows when system theme changesTor Arne Vestbø2022-04-221-1/+1
| | | | | | | | | | | | | | | | | | | The QWSI event for theme change has an optional window parameter to specify the window affected, but most platform react to global theme changes, and end up passing nullptr into the event. The reasonable thing to do in QGuiApplication in that case is send a theme change event to every QWindow, so that they are all notified about the situation. This approach is what the Windows platform plugin was doing already, but did so by iterating manually over the windows, resulting in multiple calls to QGuiApplicationPrivate::handleThemeChanged -- one for each QWSI event. Change-Id: Ifb27b6c31231377c0df389a592cafd0075d3d8bb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QCocoaTheme: use NSColor.controlAccentColor for QMenu itemsTimur Pocheptsov2022-04-051-1/+1
| | | | | | | | | | | The highligh color we have looks too different to what system menus have. Accent color seems to be better matching this color, though it's not really what we can see in menus, which are transparent and blend with watever lies below them. Fixes: QTBUG-75386 Change-Id: I03f66808eb885594862ad9b31398cae4ca186593 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CoreText: Make population of theme fonts explicitTor Arne Vestbø2022-03-301-1/+1
| | | | | | Pick-to: 6.2 6.3 Change-Id: I95e6b535e8ec98ca13c9a58f1e4ae4358ed9f028 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* CoreText: Maintain theme fonts in the font database instead of themesTor Arne Vestbø2022-03-231-7/+3
| | | | | | | | | | | | | | | | | | The ownership of the fonts were handled in the iOS and macOS themes, but the CoreText font database also kept a reference to these fonts. As there was no way for the themes to reset the font database references we could potentially end up in a situation where the font database had stale references. And as the font database would not rebuild the theme fonts once populated the themes then would not be able to build a new list of theme fonts. Moving the ownership to the font database makes semantics and management of the fonts clearer. Pick-to: 6.3 6.2 Change-Id: I61756abaf5487f28d520dfa1cf7a8ee2d716cce6 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Add ShowDirectoriesFirst platform theme hintMitch Curtis2021-11-031-0/+2
| | | | | | | | This allows Qt Quick Dialogs to accurately check how it should show files and directories. Change-Id: I0f5102553ff9a0484b3714ba176f7e5e668fd05c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* qcocoa: Fix typos in source code commentsJonas Kvinge2021-10-121-1/+1
| | | | | | Pick-to: 6.2 5.15 Change-Id: Ide20e1d133891890a7673c8403ea91b489baa8f6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add QPlatformTheme::Appearance for detecting light/dark modesMitch Curtis2021-09-171-0/+5
| | | | | | | | | And implement it on Windows and macOS. Fixes: QTBUG-83908 Fixes: QTBUG-94859 Change-Id: I7b0c062adf5d4dbaefa64c862ab8ab1348809d71 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QCocoaTheme: add ButtonText color to standard paletteRichard Moe Gustavsen2021-08-201-1/+2
| | | | | | | | | | | | | | | | The standard palette had no value set for ButtonText. The result was the we drew button text in QtQuickControls2 using Text color instead, which would be wrong in dark mode, and result in a dark color instead of white. Note: Widgets hardcode the color "white" directly in the mac style, and was not affected by the missing value. Fixes: QTBUG-89177 Pick-to: 6.2 6.1 Change-Id: Ie2d99bfac9fcc70d45e5bd40ea45becf3fd70d87 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* cocoa: Use the system-provided color for QPalette::PlaceholderTextShawn Rutledge2021-04-201-0/+5
| | | | | | | Task-number: QTBUG-92947 Task-number: QTBUG-86195 Change-Id: I2aa61ad23aae526c3fff9982f4df9847a279712c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Account for multiple screens when computing QSizeGrip available geometryZhang Hao2021-03-241-0/+2
| | | | | | | | | | | | | In a multi-screen setup, when the window was resized on one of the screens, the resize was limited to the available geometry of the screen the window was on. Fix this by using the whole virtual geometry of all the screens as basis for the resize. Fixes: QTBUG-91714 Change-Id: I28dd241d73f6a68550af88e368f0dbdcb9ebf42b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macos: Rename macos style to macOSRichard Moe Gustavsen2020-09-111-1/+1
| | | | | | | | | 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>
* Fix compiler warnings after QKeyCombination introductionVolker Hilsheimer2020-09-051-8/+8
| | | | | Change-Id: If5d7c5e037b99c14c51d83adf8b1e20d6b924bc5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QIconEngine: move away from virtual_hook usageMorten Johan Sørvig2020-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | Upgrade existing functions to be virtual functions: - virtual QString iconName() - virtual bool isNull() - virtual QPixmap scaledPixmap(...) - virtual QList<QSize> availableSizes(...) Make all of them non-const and remove the const_casts in the implementation. Keep the default implementation which calls virtual_hook(), for compatibility. Note: availableSizes was already virtual, but now loses the “const”. Port two overrides in the platform themes. Keep virutal_hook() around for future expansion. Task-number: QTBUG-85885 Change-Id: I76d0c9f75bfd6ca870c669047d4ef18b82c692e5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: rename 'macintosh' style to 'macos'Richard Moe Gustavsen2020-08-261-1/+1
| | | | | | | | | | | | | | 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>
* macOS: Move AA_MacDontSwapCtrlAndMeta logic out of QPlatformThemeTor Arne Vestbø2020-07-081-0/+37
| | | | | Change-Id: Ia36f60587d98902406de7de8acdc3c4521cfd05a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Clean up headersTor Arne Vestbø2020-06-051-1/+1
| | | | | | | | | | | | | | The headers are now C++ clean and can be used outside of Objective-C code. All includes of Objective-C frameworks have been moved to the implementation files. Header guards have been added in the few places they were missing. All includes are now done via #include, instead of sometimes using the #import variant. Change-Id: Ibb0a9c0bcfefbda4347737212e40e300a3184982 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Remove QtWidget dependency from platform pluginTor Arne Vestbø2020-06-041-19/+0
| | | | | | | | | The dialog helpers don't depend on widgets themselves, and should be built regardless of whether the widget dialogs are enabled, as these helpers can (and should) be used by other layers, such as Qt Quick. Change-Id: I1c66b474ab2f29748f1256aea90229c51c12a16f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Move QAbstractFileIconEngine into QtGuiTor Arne Vestbø2020-06-031-1/+1
| | | | | | Task-number: QTBUG-83255 Change-Id: Iab502c51600b96f315113b08fa473ed28a5457fc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move CoreText font engine/database to QtGuiTor Arne Vestbø2020-05-271-2/+2
| | | | | | Task-number: QTBUG-83255 Change-Id: Id34ed1759fdebbb1d09e51009f0370736002167c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* macOS: Move translations to their respective source filesTor Arne Vestbø2020-04-141-2/+3
| | | | | | | | | | lupdate can deal with Objective-C++ sources nowadays, most likely due to appending them to SOURCES instead of the deprecated OBJECTIVE_SOURCES. Task-number: QTBUG-30125 Change-Id: Ifc6b06f13e0f679a011d999f11c2e6d25dcf27ed Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Move palette setup into platform themeTor Arne Vestbø2020-01-141-1/+195
| | | | | | | | The theme was the only client, so there's no point in keeping it separate from its only call site. Change-Id: I4783c5db6975ad2daaede704ab5855c57f190344 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: Deliver theme changes synchronouslyTor Arne Vestbø2019-12-191-1/+1
| | | | | | | | | Otherwise the expose event that AppKit triggers will be delivered before we've propagated the theme change, and we fail to draw the UI using the new theme. Change-Id: I502122a2bf02a866d136106d831f0c2a0dfe26f2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Introduce QMacKeyValueObserver and use in theme and styleTor Arne Vestbø2019-06-071-47/+9
| | | | | | Change-Id: I2d21c883628933543ae5a66b694ff7503119bc4a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Use QMacNotificationObserver over manual notification handlingTor Arne Vestbø2019-05-291-3/+3
| | | | | | | | | This also fixes a bug where we were implicitly capturing this inside the block, which meant that we would crash if the theme was recreated. The capture is now tied to the lifetime of QCocoaTheme. Change-Id: I37df8e6c0b33bf41e76d66be3cf29576041a7546 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* macOS: Remove Mojave forward-declarations now that we build with Xcode 10Tor Arne Vestbø2019-01-031-6/+4
| | | | | Change-Id: I8528932f3744fbf3473219b6eeda7c26ac039b67 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Merge qt_mac_createRoleFonts into only callerTor Arne Vestbø2018-12-221-7/+3
| | | | | | Change-Id: Id6e61a70e4ebe47896dcbc8680d1d6b06c747871 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Reset font glyph caches when application theme changesTor Arne Vestbø2018-12-091-0/+7
| | | | | | | | | | Our glyph caches on 10.14 are based on the application appearance, so when the application goes from dark to light or light to dark, we need to reset and re-populate the glyph-caches to account for the new appearance. Change-Id: If019d8cfa33ffb2b14747444b2ff74b288992f55 Fixes: QTBUG-71018 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Cocoa: Update palette after accent color or appearance changesGabriel de Dietrich2018-08-091-19/+54
| | | | | | | | | | | | | | This updates the UI after the accent color or NSApp's effective appearance have changed. For the accent color, we listen to NSSystemColorsDidChangeNotification. For the effective appearance changes, we do KVO on NSApp.effectiveAppearance. Both changes will trigger rebuilding the system palettes followed by a ThemeChangeEvent in the window system interface layer. Task-number: QTBUG-68891 Change-Id: Iab1ec874e05f1f6d54cd60217c273e0f8ffbf49e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Cocoa QPA: Clean up 0 as pointerGabriel de Dietrich2018-04-191-6/+6
| | | | | | | | We use nil for Objective-C null pointers and nullptr everywhere else, including CoreFoundation and similar opaque types. Change-Id: Id75c59413dec54bf4d8e83cf7ed0ff7f3d8bb480 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QCocoaTheme: Include CoreServices rather than CarbonGabriel de Dietrich2018-04-181-1/+1
| | | | | | | | | | And add CoreServices as framework dependency. The standard pixmaps depend on CoreServices, or LaunchServices to be accurate. Change-Id: Ib97e521f3e950586a352bf9b30f827ce3fda8efd Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Clean up our Objective-C usageJake Petroules2018-02-201-11/+9
| | | | | | | | | | | | | | | | - 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>
* Cocoa: Use the whole geometry when in fullscreen mode for popup menusAndy Shaw2018-01-161-0/+2
| | | | | | | | | | When in full screen, then the geometry available is the whole screen not including the menubar or dock area. This ensures that it does not leave space for the dock area. Task-number: QTBUG-39403 Change-Id: I15d7b7764d83282e1ee057628680a338b72711a6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2017-10-241-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsmousehandler.cpp src/plugins/platforms/xcb/qxcbimage.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/manual/qtabletevent/regular_widgets/main.cpp Done-with: Friedemann Kleint<Friedemann.Kleint@qt.io> Done-with: Mårten Nordheim<marten.nordheim@qt.io> Change-Id: I5b2499513a92c590ed0756f7d2e93c35a64b7f30
| * Fix implementation of spell check underline stylesDmitry Shachnev2017-10-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QTextCharFormat documentation said that the used style is based on QStyle::SH_SpellCheckUnderlineStyle style hint, however in fact the implementation (drawTextItemDecoration in qpainter.cpp) uses themeHint(QPlatformTheme::SpellCheckUnderlineStyle) instead since Qt 5 (see commit 1f9ae50457a3750f). Make the documentation match that behavior, and update QPlatformTheme to use the correct default value. Also, switch Cocoa theme to use DotLine, as that is what native macOS applications use. Change-Id: I2a6bb3da6c7b0686dca87ed2c251b6abc006123c Task-number: QTBUG-50499 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>