Add enum class Qt::Appearance

It has been decided to add an appearance property in QStyleHints, which
will be propagated to classes that do not include QPlatformTheme.

Therefore an appearance enum class is added to the Qt namespace, thus
being available to all Qt classes.

Task-number: QTBUG-106383
Change-Id: Icff94b0d7adca954ce74241d6811401d41f053e6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Axel Spoerl 2022-09-15 15:16:35 +02:00
parent 986fef5ca1
commit c8cf0f17b8
2 changed files with 18 additions and 0 deletions

View File

@ -46,6 +46,12 @@ namespace Qt {
transparent
};
enum class Appearance {
Unknown = 0x0000,
Light = 0x0001,
Dark = 0x0002
};
enum MouseButton {
NoButton = 0x00000000,
LeftButton = 0x00000001,
@ -1745,6 +1751,7 @@ namespace Qt {
Q_ENUM_NS(DayOfWeek)
Q_ENUM_NS(CursorShape)
Q_ENUM_NS(GlobalColor)
Q_ENUM_NS(Appearance)
Q_ENUM_NS(AspectRatioMode)
Q_ENUM_NS(TransformationMode)
Q_FLAG_NS(ImageConversionFlags)

View File

@ -788,6 +788,17 @@
\sa QDockWidget::setAllowedAreas, QDockWidget::isAreaAllowed
*/
/*!
\enum Qt::Appearance
Represents the appearance of an application's theme,
defined by QGuiApplication::palette().
\value Unknown The appearance is unknown.
\value Light The background colors are lighter than the text color, i.e. the theme is light.
\value Dark The background colors are darker than the text color, i.e. the theme is dark.
*/
/*!
\enum Qt::ImageConversionFlag