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

(b45629207ee32a3d80b6ea6553e8762eec8a86da)

#include "qquickmaterialstyle_p.h"
#include "qquickmaterialtheme_p.h"
#include <QtCore/qdebug.h>
#include <QtQml/qqmlinfo.h>
#include <QtQuickControls2/private/qquickstyle_p.h>
#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 = true
 
static bool globalBackgroundCustom = true
 
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()

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

Definition at line 1212 of file qquickmaterialstyle.cpp.

◆ effectiveTheme()

static QQuickMaterialStyle::Theme effectiveTheme ( QQuickMaterialStyle::Theme theme)
static

Definition at line 431 of file qquickmaterialstyle.cpp.

◆ lighterShade()

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

Definition at line 1205 of file qquickmaterialstyle.cpp.

◆ resolveSetting()

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

Definition at line 1430 of file qquickmaterialstyle.cpp.

◆ toEnumValue()

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

Definition at line 1424 of file qquickmaterialstyle.cpp.

Variable Documentation

◆ backgroundColorDark

static const QRgb backgroundColorDark = 0xFF1C1B1F
static

Definition at line 365 of file qquickmaterialstyle.cpp.

◆ backgroundColorLight

static const QRgb backgroundColorLight = 0xFFFFFBFE
static

Definition at line 364 of file qquickmaterialstyle.cpp.

◆ colors

static QT_BEGIN_NAMESPACE const QRgb colors
static

Definition at line 16 of file qquickmaterialstyle.cpp.

◆ dialogColorDark

static const QRgb dialogColorDark = 0xFF424242
static

Definition at line 367 of file qquickmaterialstyle.cpp.

◆ dialogColorLight

static const QRgb dialogColorLight = 0xFFFFFFFF
static

Definition at line 366 of file qquickmaterialstyle.cpp.

◆ dividerColorDark

static const QRgb dividerColorDark = 0x1EFFFFFF
static

Definition at line 375 of file qquickmaterialstyle.cpp.

◆ dividerColorLight

static const QRgb dividerColorLight = 0x1E000000
static

Definition at line 374 of file qquickmaterialstyle.cpp.

◆ frameColorDark

static const QRgb frameColorDark = hintTextColorDark
static

Definition at line 385 of file qquickmaterialstyle.cpp.

◆ frameColorLight

const QRgb frameColorLight = hintTextColorLight
static

Definition at line 384 of file qquickmaterialstyle.cpp.

◆ globalAccent

static uint globalAccent = QQuickMaterialStyle::Pink
static

Definition at line 347 of file qquickmaterialstyle.cpp.

◆ globalAccentCustom

static bool globalAccentCustom = false
static

Definition at line 357 of file qquickmaterialstyle.cpp.

◆ globalBackground

static uint globalBackground = 0xFFFAFAFA
static

Definition at line 349 of file qquickmaterialstyle.cpp.

◆ globalBackgroundCustom

static bool globalBackgroundCustom = true
static

Definition at line 359 of file qquickmaterialstyle.cpp.

◆ globalForeground

static uint globalForeground = 0xDD000000
static

Definition at line 348 of file qquickmaterialstyle.cpp.

◆ globalForegroundCustom

static bool globalForegroundCustom = true
static

Definition at line 358 of file qquickmaterialstyle.cpp.

◆ globalPrimary

static uint globalPrimary = QQuickMaterialStyle::Indigo
static

Definition at line 346 of file qquickmaterialstyle.cpp.

◆ globalPrimaryCustom

static bool globalPrimaryCustom = false
static

Definition at line 356 of file qquickmaterialstyle.cpp.

◆ globalTheme

Definition at line 345 of file qquickmaterialstyle.cpp.

◆ globalVariant

Definition at line 363 of file qquickmaterialstyle.cpp.

◆ hasGlobalBackground

static bool hasGlobalBackground = false
static

Definition at line 353 of file qquickmaterialstyle.cpp.

◆ hasGlobalForeground

static bool hasGlobalForeground = false
static

Definition at line 352 of file qquickmaterialstyle.cpp.

◆ hintTextColorDark

static const QRgb hintTextColorDark = 0x4CFFFFFF
static

Definition at line 373 of file qquickmaterialstyle.cpp.

◆ hintTextColorLight

static const QRgb hintTextColorLight = 0x60000000
static

Definition at line 372 of file qquickmaterialstyle.cpp.

◆ iconColorDark

static const QRgb iconColorDark = 0xFFFFFFFF
static

Definition at line 377 of file qquickmaterialstyle.cpp.

◆ iconColorLight

static const QRgb iconColorLight = 0x89000000
static

Definition at line 376 of file qquickmaterialstyle.cpp.

◆ iconDisabledColorDark

static const QRgb iconDisabledColorDark = 0x4CFFFFFF
static

Definition at line 379 of file qquickmaterialstyle.cpp.

◆ iconDisabledColorLight

static const QRgb iconDisabledColorLight = 0x42000000
static

Definition at line 378 of file qquickmaterialstyle.cpp.

◆ primaryTextColorDark

static const QRgb primaryTextColorDark = 0xFFFFFFFF
static

Definition at line 369 of file qquickmaterialstyle.cpp.

◆ primaryTextColorLight

static const QRgb primaryTextColorLight = 0xDD000000
static

Definition at line 368 of file qquickmaterialstyle.cpp.

◆ raisedButtonColorDark

static const QRgb raisedButtonColorDark = 0x3FCCCCCC
static

Definition at line 381 of file qquickmaterialstyle.cpp.

◆ raisedButtonColorLight

static const QRgb raisedButtonColorLight = 0xFFD6D7D7
static

Definition at line 380 of file qquickmaterialstyle.cpp.

◆ raisedButtonDisabledColorDark

static const QRgb raisedButtonDisabledColorDark = dividerColorDark
static

Definition at line 383 of file qquickmaterialstyle.cpp.

◆ raisedButtonDisabledColorLight

static const QRgb raisedButtonDisabledColorLight = dividerColorLight
static

Definition at line 382 of file qquickmaterialstyle.cpp.

◆ rippleColorDark

static const QRgb rippleColorDark = 0x20FFFFFF
static

Definition at line 387 of file qquickmaterialstyle.cpp.

◆ rippleColorLight

static const QRgb rippleColorLight = 0x10000000
static

Definition at line 386 of file qquickmaterialstyle.cpp.

◆ secondaryTextColorDark

static const QRgb secondaryTextColorDark = 0xB2FFFFFF
static

Definition at line 371 of file qquickmaterialstyle.cpp.

◆ secondaryTextColorLight

static const QRgb secondaryTextColorLight = 0x89000000
static

Definition at line 370 of file qquickmaterialstyle.cpp.

◆ sliderDisabledColorDark

static const QRgb sliderDisabledColorDark = 0xFF616161
static

Definition at line 391 of file qquickmaterialstyle.cpp.

◆ sliderDisabledColorLight

static const QRgb sliderDisabledColorLight = 0xFF9E9E9E
static

Definition at line 390 of file qquickmaterialstyle.cpp.

◆ spinBoxDisabledIconColorDark

static const QRgb spinBoxDisabledIconColorDark = 0xFF666666
static

Definition at line 389 of file qquickmaterialstyle.cpp.

◆ spinBoxDisabledIconColorLight

static const QRgb spinBoxDisabledIconColorLight = 0xFFCCCCCC
static

Definition at line 388 of file qquickmaterialstyle.cpp.

◆ switchDisabledCheckedTrackColorDark

static const QRgb switchDisabledCheckedTrackColorDark = 0x1EE6E1E5
static

Definition at line 425 of file qquickmaterialstyle.cpp.

◆ switchDisabledCheckedTrackColorLight

static const QRgb switchDisabledCheckedTrackColorLight = 0x1E1C1B1F
static

Definition at line 424 of file qquickmaterialstyle.cpp.

◆ switchDisabledUncheckedIconColorDark

static const QRgb switchDisabledUncheckedIconColorDark = 0x61E6E1E5
static

Definition at line 427 of file qquickmaterialstyle.cpp.

◆ switchDisabledUncheckedIconColorLight

static const QRgb switchDisabledUncheckedIconColorLight = 0x611C1B1F
static

Definition at line 426 of file qquickmaterialstyle.cpp.

◆ switchDisabledUncheckedTrackBorderColorDark

static const QRgb switchDisabledUncheckedTrackBorderColorDark = 0x1EE6E1E5
static

Definition at line 423 of file qquickmaterialstyle.cpp.

◆ switchDisabledUncheckedTrackBorderColorLight

static const QRgb switchDisabledUncheckedTrackBorderColorLight = 0x1E1C1B1F
static

Definition at line 422 of file qquickmaterialstyle.cpp.

◆ switchDisabledUncheckedTrackColorDark

static const QRgb switchDisabledUncheckedTrackColorDark = 0x1E49454F
static

Definition at line 421 of file qquickmaterialstyle.cpp.

◆ switchDisabledUncheckedTrackColorLight

static const QRgb switchDisabledUncheckedTrackColorLight = 0x1EE7E0EC
static

Definition at line 420 of file qquickmaterialstyle.cpp.

◆ switchUncheckedTrackColorDark

static const QRgb switchUncheckedTrackColorDark = 0x49454F
static

Definition at line 419 of file qquickmaterialstyle.cpp.

◆ switchUncheckedTrackColorLight

static const QRgb switchUncheckedTrackColorLight = 0xFFE7E0EC
static

Definition at line 418 of file qquickmaterialstyle.cpp.

◆ textFieldFilledContainerColorDark

static const QRgb textFieldFilledContainerColorDark = 0xFF49454F
static

Definition at line 429 of file qquickmaterialstyle.cpp.

◆ textFieldFilledContainerColorLight

static const QRgb textFieldFilledContainerColorLight = 0xFFE7E0EC
static

Definition at line 428 of file qquickmaterialstyle.cpp.