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
qwindows11style.cpp File Reference

(a20ab5a3c53b7b9e127b2bd65956631b590012f6)

#include "qwindows11style_p.h"
#include <qstylehints.h>
#include <private/qstyleanimation_p.h>
#include <private/qstyle_p.h>
#include <private/qstylehelper_p.h>
#include <private/qapplication_p.h>
#include <private/qcombobox_p.h>
#include <qstyleoption.h>
#include <qpainter.h>
#include <qpainterstateguard.h>
#include <QGraphicsDropShadowEffect>
#include <QLatin1StringView>
#include <QtWidgets/qcombobox.h>
#include <QtWidgets/qgraphicsview.h>
#include <QtWidgets/qlistview.h>
#include <QtWidgets/qmenu.h>
#include <QtWidgets/qtextedit.h>
#include <QtWidgets/qtreeview.h>
#include "qdrawutil.h"
#include <chrono>
Include dependency graph for qwindows11style.cpp:

Go to the source code of this file.

Namespaces

namespace  StyleOptionHelper

Macros

#define AcceptMedium   u"\uF78C"_s
#define Dash12   u"\uE629"_s
#define CheckMark   u"\uE73E"_s
#define CaretLeftSolid8   u"\uEDD9"_s
#define CaretRightSolid8   u"\uEDDA"_s
#define CaretUpSolid8   u"\uEDDB"_s
#define CaretDownSolid8   u"\uEDDC"_s
#define ChevronDown   u"\uE70D"_s
#define ChevronUp   u"\uE70E"_s
#define ChevronDownMed   u"\uE972"_s
#define ChevronLeftMed   u"\uE973"_s
#define ChevronRightMed   u"\uE974"_s
#define ChevronUpSmall   u"\uE96D"_s
#define ChevronDownSmall   u"\uE96E"_s
#define ChromeMinimize   u"\uE921"_s
#define ChromeMaximize   u"\uE922"_s
#define ChromeRestore   u"\uE923"_s
#define ChromeClose   u"\uE8BB"_s
#define Help   u"\uE897"_s
#define SET_IF_UNRESOLVED(GROUP, ROLE, VALUE)

Enumerations

enum class  StyleOptionHelper::ControlState {
  StyleOptionHelper::Normal , StyleOptionHelper::Hover , StyleOptionHelper::Pressed , StyleOptionHelper::Disabled ,
  StyleOptionHelper::Normal , StyleOptionHelper::Hover , StyleOptionHelper::Pressed , StyleOptionHelper::Disabled
}
enum class  StyleOptionHelper::ControlState {
  StyleOptionHelper::Normal , StyleOptionHelper::Hover , StyleOptionHelper::Pressed , StyleOptionHelper::Disabled ,
  StyleOptionHelper::Normal , StyleOptionHelper::Hover , StyleOptionHelper::Pressed , StyleOptionHelper::Disabled
}

Functions

bool StyleOptionHelper::isChecked (const QStyleOption *option)
bool StyleOptionHelper::isDisabled (const QStyleOption *option)
bool StyleOptionHelper::isPressed (const QStyleOption *option)
bool StyleOptionHelper::isHover (const QStyleOption *option)
bool StyleOptionHelper::isAutoRaise (const QStyleOption *option)
ControlState StyleOptionHelper::calcControlState (const QStyleOption *option)
template<typename R, typename P, typename B>
static void drawRoundedRect (QPainter *p, R &&rect, P &&pen, B &&brush)
static constexpr int percentToAlpha (double percent)
static constexpr QColor shellCaptionCloseFillColorPrimary (0xC4, 0x2B, 0x1C, 0xFF)
static constexpr QColor shellCaptionCloseTextFillColorPrimary (0xFF, 0xFF, 0xFF, 0xFF)
static constexpr QColor shellCaptionCloseFillColorSecondary (0xC4, 0x2B, 0x1C, 0xE6)
static constexpr QColor shellCaptionCloseTextFillColorSecondary (0xFF, 0xFF, 0xFF, 0xB3)
static qreal radioButtonInnerRadius (int state)
static qreal sliderInnerRadius (QStyle::State state, bool insideHandle)
static void populateLightSystemBasePalette (QPalette &result)
static void populateDarkSystemBasePalette (QPalette &result)

Variables

static constexpr int topLevelRoundingRadius = 8
static constexpr int secondLevelRoundingRadius = 4
static constexpr std::array< QColor, 32 > WINUI3ColorsLight
static constexpr std::array< QColor, 32 > WINUI3ColorsDark
static constexpr std::array< std::array< QColor, 32 >, 2 > WINUI3Colors

Macro Definition Documentation

◆ AcceptMedium

#define AcceptMedium   u"\uF78C"_s

Definition at line 84 of file qwindows11style.cpp.

◆ CaretDownSolid8

#define CaretDownSolid8   u"\uEDDC"_s

Definition at line 92 of file qwindows11style.cpp.

◆ CaretLeftSolid8

#define CaretLeftSolid8   u"\uEDD9"_s

Definition at line 89 of file qwindows11style.cpp.

◆ CaretRightSolid8

#define CaretRightSolid8   u"\uEDDA"_s

Definition at line 90 of file qwindows11style.cpp.

◆ CaretUpSolid8

#define CaretUpSolid8   u"\uEDDB"_s

Definition at line 91 of file qwindows11style.cpp.

◆ CheckMark

#define CheckMark   u"\uE73E"_s

Definition at line 87 of file qwindows11style.cpp.

◆ ChevronDown

#define ChevronDown   u"\uE70D"_s

Definition at line 94 of file qwindows11style.cpp.

◆ ChevronDownMed

#define ChevronDownMed   u"\uE972"_s

Definition at line 97 of file qwindows11style.cpp.

◆ ChevronDownSmall

#define ChevronDownSmall   u"\uE96E"_s

Definition at line 102 of file qwindows11style.cpp.

◆ ChevronLeftMed

#define ChevronLeftMed   u"\uE973"_s

Definition at line 98 of file qwindows11style.cpp.

◆ ChevronRightMed

#define ChevronRightMed   u"\uE974"_s

Definition at line 99 of file qwindows11style.cpp.

◆ ChevronUp

#define ChevronUp   u"\uE70E"_s

Definition at line 95 of file qwindows11style.cpp.

◆ ChevronUpSmall

#define ChevronUpSmall   u"\uE96D"_s

Definition at line 101 of file qwindows11style.cpp.

◆ ChromeClose

#define ChromeClose   u"\uE8BB"_s

Definition at line 107 of file qwindows11style.cpp.

◆ ChromeMaximize

#define ChromeMaximize   u"\uE922"_s

Definition at line 105 of file qwindows11style.cpp.

◆ ChromeMinimize

#define ChromeMinimize   u"\uE921"_s

Definition at line 104 of file qwindows11style.cpp.

◆ ChromeRestore

#define ChromeRestore   u"\uE923"_s

Definition at line 106 of file qwindows11style.cpp.

◆ Dash12

#define Dash12   u"\uE629"_s

Definition at line 86 of file qwindows11style.cpp.

◆ Help

#define Help   u"\uE897"_s

Definition at line 109 of file qwindows11style.cpp.

◆ SET_IF_UNRESOLVED

#define SET_IF_UNRESOLVED ( GROUP,
ROLE,
VALUE )
Value:
if (!result.isBrushSet(QPalette::Inactive, ROLE) || styleSheetChanged) \
result.setColor(GROUP, ROLE, VALUE)
@ Inactive
Definition qpalette.h:50
GLuint64EXT * result
[6]

Definition at line 2354 of file qwindows11style.cpp.

Function Documentation

◆ drawRoundedRect()

template<typename R, typename P, typename B>
void drawRoundedRect ( QPainter * p,
R && rect,
P && pen,
B && brush )
inlinestatic

Definition at line 112 of file qwindows11style.cpp.

References secondLevelRoundingRadius.

◆ percentToAlpha()

constexpr int percentToAlpha ( double percent)
staticconstexpr

Definition at line 119 of file qwindows11style.cpp.

◆ populateDarkSystemBasePalette()

void populateDarkSystemBasePalette ( QPalette & result)
static

Definition at line 2412 of file qwindows11style.cpp.

◆ populateLightSystemBasePalette()

void populateLightSystemBasePalette ( QPalette & result)
static

Definition at line 2358 of file qwindows11style.cpp.

◆ radioButtonInnerRadius()

qreal radioButtonInnerRadius ( int state)
static

Definition at line 234 of file qwindows11style.cpp.

◆ shellCaptionCloseFillColorPrimary()

constexpr QColor shellCaptionCloseFillColorPrimary ( 0xC4 ,
0x2B ,
0x1C ,
0xFF  )
staticconstexpr

◆ shellCaptionCloseFillColorSecondary()

constexpr QColor shellCaptionCloseFillColorSecondary ( 0xC4 ,
0x2B ,
0x1C ,
0xE6  )
staticconstexpr

◆ shellCaptionCloseTextFillColorPrimary()

constexpr QColor shellCaptionCloseTextFillColorPrimary ( 0xFF ,
0xFF ,
0xFF ,
0xFF  )
staticconstexpr

◆ shellCaptionCloseTextFillColorSecondary()

constexpr QColor shellCaptionCloseTextFillColorSecondary ( 0xFF ,
0xFF ,
0xFF ,
0xB3  )
staticconstexpr

◆ sliderInnerRadius()

qreal sliderInnerRadius ( QStyle::State state,
bool insideHandle )
static

Definition at line 248 of file qwindows11style.cpp.

Variable Documentation

◆ secondLevelRoundingRadius

constexpr int secondLevelRoundingRadius = 4
staticconstexpr

Definition at line 46 of file qwindows11style.cpp.

Referenced by QWindows11Style::drawPrimitive(), and drawRoundedRect().

◆ topLevelRoundingRadius

constexpr int topLevelRoundingRadius = 8
staticconstexpr

Definition at line 45 of file qwindows11style.cpp.

◆ WINUI3Colors

constexpr std::array< std::array< QColor, 32 >, 2 > WINUI3Colors
staticconstexpr
Initial value:
{
}
static constexpr std::array< QColor, 32 > WINUI3ColorsLight
static constexpr std::array< QColor, 32 > WINUI3ColorsDark

Definition at line 194 of file qwindows11style.cpp.

◆ WINUI3ColorsDark

constexpr std::array< QColor, 32 > WINUI3ColorsDark
staticconstexpr

Definition at line 159 of file qwindows11style.cpp.

◆ WINUI3ColorsLight

constexpr std::array< QColor, 32 > WINUI3ColorsLight
staticconstexpr

Definition at line 124 of file qwindows11style.cpp.