Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickbasictheme.cpp
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5
6#include <QtQuickTemplates2/private/qquicktheme_p.h>
7
9
11{
12 QPalette systemPalette;
13
14 systemPalette.setColor(QPalette::Base, QColor::fromRgba(0xFFFFFFFF));
16
17 systemPalette.setColor(QPalette::Button, QColor::fromRgba(0xFFE0E0E0));
18
19 systemPalette.setColor(QPalette::ButtonText, QColor::fromRgba(0xFF26282A));
21
22 systemPalette.setColor(QPalette::BrightText, QColor::fromRgba(0xFFFFFFFF));
24
25 systemPalette.setColor(QPalette::Dark, QColor::fromRgba(0xFF353637));
26
27 systemPalette.setColor(QPalette::Highlight, QColor::fromRgba(0xFF0066FF));
29
30 systemPalette.setColor(QPalette::HighlightedText, QColor::fromRgba(0xFF090909));
31
32 systemPalette.setColor(QPalette::Light, QColor::fromRgba(0xFFF6F6F6));
33
34 systemPalette.setColor(QPalette::Link, QColor::fromRgba(0xFF45A7D7));
35
36 systemPalette.setColor(QPalette::Mid, QColor::fromRgba(0xFFBDBDBD));
37
38 systemPalette.setColor(QPalette::Midlight, QColor::fromRgba(0xFFE4E4E4));
39
40 systemPalette.setColor(QPalette::Text, QColor::fromRgba(0xFF353637));
42
43 systemPalette.setColor(QPalette::Shadow, QColor::fromRgba(0xFF28282A));
44
45 systemPalette.setColor(QPalette::ToolTipBase, QColor::fromRgba(0xFFFFFFFF));
46 systemPalette.setColor(QPalette::ToolTipText, QColor::fromRgba(0xFF000000));
47
48 systemPalette.setColor(QPalette::Window, QColor::fromRgba(0xFFFFFFFF));
49
50 systemPalette.setColor(QPalette::WindowText, QColor::fromRgba(0xFF26282A));
52
53 systemPalette.setColor(QPalette::PlaceholderText, QColor::fromRgba(0x88353637));
54
55 theme->setPalette(QQuickTheme::System, systemPalette);
56}
57
static QColor fromRgba(QRgb rgba) noexcept
Static convenience function that returns a QColor constructed from the given QRgb value rgba.
Definition qcolor.cpp:2385
The QPalette class contains color groups for each widget state.
Definition qpalette.h:19
@ Disabled
Definition qpalette.h:49
void setColor(ColorGroup cg, ColorRole cr, const QColor &color)
Sets the color in the specified color group, used for the given color role, to the specified solid co...
Definition qpalette.h:146
@ HighlightedText
Definition qpalette.h:53
@ ToolTipBase
Definition qpalette.h:57
@ BrightText
Definition qpalette.h:52
@ ButtonText
Definition qpalette.h:52
@ WindowText
Definition qpalette.h:51
@ Highlight
Definition qpalette.h:53
@ ToolTipText
Definition qpalette.h:57
@ PlaceholderText
Definition qpalette.h:58
@ Midlight
Definition qpalette.h:51
static void initialize(QQuickTheme *theme)
void setPalette(Scope scope, const QPalette &palette)
Combined button and popup list for selecting options.