Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquickmaterialstyle.cpp File Reference

(01cd43d30e3ca2c4dd94a4a4711604adb9417517)

#include "qquickmaterialstyle_p.h"
#include "qquickmaterialtheme_p.h"
#include <QtCore/qdebug.h>
#include <QtQml/qqmlinfo.h>
#include <QtQuickControls2/private/qquickstyle_p.h>
#include <algorithm>
#include "moc_qquickmaterialstyle_p.cpp"
Include dependency graph for qquickmaterialstyle.cpp:

Go to the source code of this file.

Functions

static QQuickMaterialStyle::Theme effectiveTheme (QQuickMaterialStyle::Theme theme)
static QColor lighterShade (const QColor &color, qreal amount)
static QColor darkerShade (const QColor &color, qreal amount)
template<typename Enum>
static Enum toEnumValue (const QByteArray &value, bool *ok)
static QByteArray resolveSetting (const QByteArray &env, const QSharedPointer< QSettings > &settings, const QString &name)

Variables

static QT_BEGIN_NAMESPACE const QRgb colors [][14]
static QQuickMaterialStyle::Theme globalTheme = QQuickMaterialStyle::Light
static uint globalPrimary = QQuickMaterialStyle::Indigo
static uint globalAccent = QQuickMaterialStyle::Pink
static uint globalForeground = 0xDD000000
static uint globalBackground = 0xFFFAFAFA
static bool hasGlobalForeground = false
static bool hasGlobalBackground = false
static bool globalPrimaryCustom = false
static bool globalAccentCustom = false
static bool globalForegroundCustom = false
static bool globalBackgroundCustom = false
static QQuickMaterialStyle::Variant globalVariant = QQuickMaterialStyle::Normal
static const QRgb backgroundColorLight = 0xFFFFFBFE
static const QRgb backgroundColorDark = 0xFF1C1B1F
static const QRgb dialogColorLight = 0xFFFFFFFF
static const QRgb dialogColorDark = 0xFF424242
static const QRgb primaryTextColorLight = 0xDD000000
static const QRgb primaryTextColorDark = 0xFFFFFFFF
static const QRgb secondaryTextColorLight = 0x89000000
static const QRgb secondaryTextColorDark = 0xB2FFFFFF
static const QRgb hintTextColorLight = 0x60000000
static const QRgb hintTextColorDark = 0x4CFFFFFF
static const QRgb dividerColorLight = 0x1E000000
static const QRgb dividerColorDark = 0x1EFFFFFF
static const QRgb iconColorLight = 0x89000000
static const QRgb iconColorDark = 0xFFFFFFFF
static const QRgb iconDisabledColorLight = 0x42000000
static const QRgb iconDisabledColorDark = 0x4CFFFFFF
static const QRgb raisedButtonColorLight = 0xFFD6D7D7
static const QRgb raisedButtonColorDark = 0x3FCCCCCC
static const QRgb raisedButtonDisabledColorLight = dividerColorLight
static const QRgb raisedButtonDisabledColorDark = dividerColorDark
static const QRgb frameColorLight = hintTextColorLight
static const QRgb frameColorDark = hintTextColorDark
static const QRgb rippleColorLight = 0x10000000
static const QRgb rippleColorDark = 0x20FFFFFF
static const QRgb spinBoxDisabledIconColorLight = 0xFFCCCCCC
static const QRgb spinBoxDisabledIconColorDark = 0xFF666666
static const QRgb sliderDisabledColorLight = 0xFF9E9E9E
static const QRgb sliderDisabledColorDark = 0xFF616161
static const QRgb switchUncheckedTrackColorLight = 0xFFE7E0EC
static const QRgb switchUncheckedTrackColorDark = 0x49454F
static const QRgb switchDisabledUncheckedTrackColorLight = 0x1EE7E0EC
static const QRgb switchDisabledUncheckedTrackColorDark = 0x1E49454F
static const QRgb switchDisabledUncheckedTrackBorderColorLight = 0x1E1C1B1F
static const QRgb switchDisabledUncheckedTrackBorderColorDark = 0x1EE6E1E5
static const QRgb switchDisabledCheckedTrackColorLight = 0x1E1C1B1F
static const QRgb switchDisabledCheckedTrackColorDark = 0x1EE6E1E5
static const QRgb switchDisabledUncheckedIconColorLight = 0x611C1B1F
static const QRgb switchDisabledUncheckedIconColorDark = 0x61E6E1E5
static const QRgb textFieldFilledContainerColorLight = 0xFFE7E0EC
static const QRgb textFieldFilledContainerColorDark = 0xFF49454F

Function Documentation

◆ darkerShade()

QColor darkerShade ( const QColor & color,
qreal amount )
static

Definition at line 1254 of file qquickmaterialstyle.cpp.

◆ effectiveTheme()

Definition at line 434 of file qquickmaterialstyle.cpp.

◆ lighterShade()

QColor lighterShade ( const QColor & color,
qreal amount )
static

Definition at line 1246 of file qquickmaterialstyle.cpp.

◆ resolveSetting()

QByteArray resolveSetting ( const QByteArray & env,
const QSharedPointer< QSettings > & settings,
const QString & name )
static

Definition at line 1473 of file qquickmaterialstyle.cpp.

◆ toEnumValue()

template<typename Enum>
Enum toEnumValue ( const QByteArray & value,
bool * ok )
static

Definition at line 1467 of file qquickmaterialstyle.cpp.

Variable Documentation

◆ backgroundColorDark

const QRgb backgroundColorDark = 0xFF1C1B1F
static

Definition at line 368 of file qquickmaterialstyle.cpp.

◆ backgroundColorLight

const QRgb backgroundColorLight = 0xFFFFFBFE
static

Definition at line 367 of file qquickmaterialstyle.cpp.

◆ colors

QT_BEGIN_NAMESPACE const QRgb colors
static

Definition at line 19 of file qquickmaterialstyle.cpp.

◆ dialogColorDark

const QRgb dialogColorDark = 0xFF424242
static

Definition at line 370 of file qquickmaterialstyle.cpp.

◆ dialogColorLight

const QRgb dialogColorLight = 0xFFFFFFFF
static

Definition at line 369 of file qquickmaterialstyle.cpp.

◆ dividerColorDark

const QRgb dividerColorDark = 0x1EFFFFFF
static

Definition at line 378 of file qquickmaterialstyle.cpp.

◆ dividerColorLight

const QRgb dividerColorLight = 0x1E000000
static

Definition at line 377 of file qquickmaterialstyle.cpp.

◆ frameColorDark

const QRgb frameColorDark = hintTextColorDark
static

Definition at line 388 of file qquickmaterialstyle.cpp.

◆ frameColorLight

const QRgb frameColorLight = hintTextColorLight
static

Definition at line 387 of file qquickmaterialstyle.cpp.

◆ globalAccent

uint globalAccent = QQuickMaterialStyle::Pink
static

Definition at line 350 of file qquickmaterialstyle.cpp.

◆ globalAccentCustom

bool globalAccentCustom = false
static

Definition at line 360 of file qquickmaterialstyle.cpp.

◆ globalBackground

uint globalBackground = 0xFFFAFAFA
static

Definition at line 352 of file qquickmaterialstyle.cpp.

◆ globalBackgroundCustom

bool globalBackgroundCustom = false
static

Definition at line 362 of file qquickmaterialstyle.cpp.

◆ globalForeground

uint globalForeground = 0xDD000000
static

Definition at line 351 of file qquickmaterialstyle.cpp.

◆ globalForegroundCustom

bool globalForegroundCustom = false
static

Definition at line 361 of file qquickmaterialstyle.cpp.

◆ globalPrimary

uint globalPrimary = QQuickMaterialStyle::Indigo
static

Definition at line 349 of file qquickmaterialstyle.cpp.

◆ globalPrimaryCustom

bool globalPrimaryCustom = false
static

Definition at line 359 of file qquickmaterialstyle.cpp.

◆ globalTheme

Definition at line 348 of file qquickmaterialstyle.cpp.

◆ globalVariant

Definition at line 366 of file qquickmaterialstyle.cpp.

◆ hasGlobalBackground

bool hasGlobalBackground = false
static

Definition at line 356 of file qquickmaterialstyle.cpp.

◆ hasGlobalForeground

bool hasGlobalForeground = false
static

Definition at line 355 of file qquickmaterialstyle.cpp.

◆ hintTextColorDark

const QRgb hintTextColorDark = 0x4CFFFFFF
static

Definition at line 376 of file qquickmaterialstyle.cpp.

◆ hintTextColorLight

const QRgb hintTextColorLight = 0x60000000
static

Definition at line 375 of file qquickmaterialstyle.cpp.

◆ iconColorDark

const QRgb iconColorDark = 0xFFFFFFFF
static

Definition at line 380 of file qquickmaterialstyle.cpp.

◆ iconColorLight

const QRgb iconColorLight = 0x89000000
static

Definition at line 379 of file qquickmaterialstyle.cpp.

◆ iconDisabledColorDark

const QRgb iconDisabledColorDark = 0x4CFFFFFF
static

Definition at line 382 of file qquickmaterialstyle.cpp.

◆ iconDisabledColorLight

const QRgb iconDisabledColorLight = 0x42000000
static

Definition at line 381 of file qquickmaterialstyle.cpp.

◆ primaryTextColorDark

const QRgb primaryTextColorDark = 0xFFFFFFFF
static

Definition at line 372 of file qquickmaterialstyle.cpp.

◆ primaryTextColorLight

const QRgb primaryTextColorLight = 0xDD000000
static

Definition at line 371 of file qquickmaterialstyle.cpp.

◆ raisedButtonColorDark

const QRgb raisedButtonColorDark = 0x3FCCCCCC
static

Definition at line 384 of file qquickmaterialstyle.cpp.

◆ raisedButtonColorLight

const QRgb raisedButtonColorLight = 0xFFD6D7D7
static

Definition at line 383 of file qquickmaterialstyle.cpp.

◆ raisedButtonDisabledColorDark

const QRgb raisedButtonDisabledColorDark = dividerColorDark
static

Definition at line 386 of file qquickmaterialstyle.cpp.

◆ raisedButtonDisabledColorLight

const QRgb raisedButtonDisabledColorLight = dividerColorLight
static

Definition at line 385 of file qquickmaterialstyle.cpp.

◆ rippleColorDark

const QRgb rippleColorDark = 0x20FFFFFF
static

Definition at line 390 of file qquickmaterialstyle.cpp.

◆ rippleColorLight

const QRgb rippleColorLight = 0x10000000
static

Definition at line 389 of file qquickmaterialstyle.cpp.

◆ secondaryTextColorDark

const QRgb secondaryTextColorDark = 0xB2FFFFFF
static

Definition at line 374 of file qquickmaterialstyle.cpp.

◆ secondaryTextColorLight

const QRgb secondaryTextColorLight = 0x89000000
static

Definition at line 373 of file qquickmaterialstyle.cpp.

◆ sliderDisabledColorDark

const QRgb sliderDisabledColorDark = 0xFF616161
static

Definition at line 394 of file qquickmaterialstyle.cpp.

◆ sliderDisabledColorLight

const QRgb sliderDisabledColorLight = 0xFF9E9E9E
static

Definition at line 393 of file qquickmaterialstyle.cpp.

◆ spinBoxDisabledIconColorDark

const QRgb spinBoxDisabledIconColorDark = 0xFF666666
static

Definition at line 392 of file qquickmaterialstyle.cpp.

◆ spinBoxDisabledIconColorLight

const QRgb spinBoxDisabledIconColorLight = 0xFFCCCCCC
static

Definition at line 391 of file qquickmaterialstyle.cpp.

◆ switchDisabledCheckedTrackColorDark

const QRgb switchDisabledCheckedTrackColorDark = 0x1EE6E1E5
static

Definition at line 428 of file qquickmaterialstyle.cpp.

◆ switchDisabledCheckedTrackColorLight

const QRgb switchDisabledCheckedTrackColorLight = 0x1E1C1B1F
static

Definition at line 427 of file qquickmaterialstyle.cpp.

◆ switchDisabledUncheckedIconColorDark

const QRgb switchDisabledUncheckedIconColorDark = 0x61E6E1E5
static

Definition at line 430 of file qquickmaterialstyle.cpp.

◆ switchDisabledUncheckedIconColorLight

const QRgb switchDisabledUncheckedIconColorLight = 0x611C1B1F
static

Definition at line 429 of file qquickmaterialstyle.cpp.

◆ switchDisabledUncheckedTrackBorderColorDark

const QRgb switchDisabledUncheckedTrackBorderColorDark = 0x1EE6E1E5
static

Definition at line 426 of file qquickmaterialstyle.cpp.

◆ switchDisabledUncheckedTrackBorderColorLight

const QRgb switchDisabledUncheckedTrackBorderColorLight = 0x1E1C1B1F
static

Definition at line 425 of file qquickmaterialstyle.cpp.

◆ switchDisabledUncheckedTrackColorDark

const QRgb switchDisabledUncheckedTrackColorDark = 0x1E49454F
static

Definition at line 424 of file qquickmaterialstyle.cpp.

◆ switchDisabledUncheckedTrackColorLight

const QRgb switchDisabledUncheckedTrackColorLight = 0x1EE7E0EC
static

Definition at line 423 of file qquickmaterialstyle.cpp.

◆ switchUncheckedTrackColorDark

const QRgb switchUncheckedTrackColorDark = 0x49454F
static

Definition at line 422 of file qquickmaterialstyle.cpp.

◆ switchUncheckedTrackColorLight

const QRgb switchUncheckedTrackColorLight = 0xFFE7E0EC
static

Definition at line 421 of file qquickmaterialstyle.cpp.

◆ textFieldFilledContainerColorDark

const QRgb textFieldFilledContainerColorDark = 0xFF49454F
static

Definition at line 432 of file qquickmaterialstyle.cpp.

◆ textFieldFilledContainerColorLight

const QRgb textFieldFilledContainerColorLight = 0xFFE7E0EC
static

Definition at line 431 of file qquickmaterialstyle.cpp.