diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2023-09-05 15:55:41 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2023-12-12 16:44:45 -0700 |
commit | aec0681977ca996ac5074dcb66de23bd8499d25e (patch) | |
tree | 90706e7f97dbfe08ae5db7a3e09a808c0aedd96d /src/quick/util/qquicksystempalette.cpp | |
parent | 9b93c41362155dc92d0a19a0268a8813e99de4bf (diff) |
Make accent color available in SystemPalette
Since we added it to the Item.palette property in 6.6
(b82af7b42db3c206ce7dd44e39304bf1166024f2), we might as well
be consistent.
Also add placeholderText to the tst_qquicksystempalette tests
(amends f625afb9f353f23345824995a3de55094706cb29).
Task-number: QTBUG-116106
Pick-to: 6.7
Change-Id: I878e29ff7188fd54e8a0da41bcf93932bfca57e6
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quick/util/qquicksystempalette.cpp')
-rw-r--r-- | src/quick/util/qquicksystempalette.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/quick/util/qquicksystempalette.cpp b/src/quick/util/qquicksystempalette.cpp index 00d62f3fdb..46b2fc00ba 100644 --- a/src/quick/util/qquicksystempalette.cpp +++ b/src/quick/util/qquicksystempalette.cpp @@ -230,6 +230,20 @@ QColor QQuickSystemPalette::placeholderText() const Q_D(const QQuickSystemPalette); return QGuiApplication::palette().color(d->group, QPalette::PlaceholderText); } + +/*! + \qmlproperty color QtQuick::SystemPalette::accent + The accent color of the current color group. + + \since 6.7 + \sa QPalette::ColorRole +*/ +QColor QQuickSystemPalette::accent() const +{ + Q_D(const QQuickSystemPalette); + return QGuiApplication::palette().color(d->group, QPalette::Accent); +} + /*! \qmlproperty enumeration QtQuick::SystemPalette::colorGroup |