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
4#include "qquickbasictheme_p.h"
5
6#include <QtQuickTemplates2/private/qquicktheme_p.h>
7
8QT_BEGIN_NAMESPACE
9
10void QQuickBasicTheme::initialize(QQuickTheme *theme)
11{
12 QPalette systemPalette;
13
14 systemPalette.setColor(acr: QPalette::Base, acolor: QColor::fromRgba(rgba: 0xFFFFFFFF));
15 systemPalette.setColor(acg: QPalette::Disabled, acr: QPalette::Base, acolor: QColor::fromRgba(rgba: 0xFFD6D6D6));
16
17 systemPalette.setColor(acr: QPalette::Button, acolor: QColor::fromRgba(rgba: 0xFFE0E0E0));
18
19 systemPalette.setColor(acr: QPalette::ButtonText, acolor: QColor::fromRgba(rgba: 0xFF26282A));
20 systemPalette.setColor(acg: QPalette::Disabled, acr: QPalette::ButtonText, acolor: QColor::fromRgba(rgba: 0x4D26282A));
21
22 systemPalette.setColor(acr: QPalette::BrightText, acolor: QColor::fromRgba(rgba: 0xFFFFFFFF));
23 systemPalette.setColor(acg: QPalette::Disabled, acr: QPalette::BrightText, acolor: QColor::fromRgba(rgba: 0x4DFFFFFF));
24
25 systemPalette.setColor(acr: QPalette::Dark, acolor: QColor::fromRgba(rgba: 0xFF353637));
26
27 systemPalette.setColor(acr: QPalette::Highlight, acolor: QColor::fromRgba(rgba: 0xFF0066FF));
28 systemPalette.setColor(acg: QPalette::Disabled, acr: QPalette::Highlight, acolor: QColor::fromRgba(rgba: 0xFFF0F6FF));
29
30 systemPalette.setColor(acr: QPalette::HighlightedText, acolor: QColor::fromRgba(rgba: 0xFF090909));
31
32 systemPalette.setColor(acr: QPalette::Light, acolor: QColor::fromRgba(rgba: 0xFFF6F6F6));
33
34 systemPalette.setColor(acr: QPalette::Link, acolor: QColor::fromRgba(rgba: 0xFF45A7D7));
35
36 systemPalette.setColor(acr: QPalette::Mid, acolor: QColor::fromRgba(rgba: 0xFFBDBDBD));
37
38 systemPalette.setColor(acr: QPalette::Midlight, acolor: QColor::fromRgba(rgba: 0xFFE4E4E4));
39
40 systemPalette.setColor(acr: QPalette::Text, acolor: QColor::fromRgba(rgba: 0xFF353637));
41 systemPalette.setColor(acg: QPalette::Disabled, acr: QPalette::Text, acolor: QColor::fromRgba(rgba: 0x7F353637));
42
43 systemPalette.setColor(acr: QPalette::Shadow, acolor: QColor::fromRgba(rgba: 0xFF28282A));
44
45 systemPalette.setColor(acr: QPalette::ToolTipBase, acolor: QColor::fromRgba(rgba: 0xFFFFFFFF));
46 systemPalette.setColor(acr: QPalette::ToolTipText, acolor: QColor::fromRgba(rgba: 0xFF000000));
47
48 systemPalette.setColor(acr: QPalette::Window, acolor: QColor::fromRgba(rgba: 0xFFFFFFFF));
49
50 systemPalette.setColor(acr: QPalette::WindowText, acolor: QColor::fromRgba(rgba: 0xFF26282A));
51 systemPalette.setColor(acg: QPalette::Disabled, acr: QPalette::WindowText, acolor: QColor::fromRgba(rgba: 0xFFBDBEBF));
52
53 systemPalette.setColor(acr: QPalette::PlaceholderText, acolor: QColor::fromRgba(rgba: 0x88353637));
54
55 theme->setPalette(scope: QQuickTheme::System, palette: systemPalette);
56}
57
58QT_END_NAMESPACE
59

source code of qtdeclarative/src/quickcontrols/basic/qquickbasictheme.cpp