6#include <QtGui/qcolor.h>
7#include <QtGui/qpalette.h>
8#include <QtGui/qpa/qplatformtheme.h>
9#include <QtGui/private/qguiapplication_p.h>
11#include <QtQuick/private/qquickpalette_p.h>
22 return QColor(255, 255, 255, 90);
27 return QColor(0, 0, 0, 60);
32 return QColor(0, 0, 0, 18);
37 return QColor(255, 255, 255, 30);
47 return palette->highlightedText();
52 return palette->window().darker(140);
87 return !
enabled ? darkOutline.lighter(115) : darkOutline;
102 const int maxFactor = 100;
103 const auto rgbColorB = colorB.toRgb();
105 tmp.
setRed((tmp.
red() * factor) / maxFactor + (rgbColorB.red() * (maxFactor - factor)) / maxFactor);
106 tmp.
setGreen((tmp.
green() * factor) / maxFactor + (rgbColorB.green() * (maxFactor - factor)) / maxFactor);
107 tmp.
setBlue((tmp.
blue() * factor) / maxFactor + (rgbColorB.blue() * (maxFactor - factor)) / maxFactor);
116 qMin<int>(255,
color.value() * 0.9));
122#include "moc_qquickfusionstyle_p.cpp"
The QColor class provides colors based on RGB, HSV or CMYK values.
QColor toRgb() const noexcept
Create and returns an RGB QColor based on this color.
void setGreen(int green)
Sets the green color component of this color to green.
void setBlue(int blue)
Sets the blue color component of this color to blue.
int red() const noexcept
Returns the red color component of this color.
int blue() const noexcept
Returns the blue color component of this color.
int green() const noexcept
Returns the green color component of this color.
QColor lighter(int f=150) const noexcept
void setRed(int red)
Sets the red color component of this color to red.
static Q_INVOKABLE QColor highlight(QQuickPalette *palette)
static Q_INVOKABLE QColor mergedColors(const QColor &colorA, const QColor &colorB, int factor=50)
static Q_INVOKABLE QColor outline(QQuickPalette *palette)
static Q_INVOKABLE QColor highlightedOutline(QQuickPalette *palette)
static Q_INVOKABLE QColor tabFrameColor(QQuickPalette *palette)
static Q_INVOKABLE QColor gradientStop(const QColor &baseColor)
QQuickFusionStyle(QObject *parent=nullptr)
static Q_INVOKABLE QColor buttonOutline(QQuickPalette *palette, bool highlighted=false, bool enabled=true)
static Q_INVOKABLE QColor highlightedText(QQuickPalette *palette)
static Q_INVOKABLE QColor grooveColor(QQuickPalette *palette)
static Q_INVOKABLE QColor buttonColor(QQuickPalette *palette, bool highlighted=false, bool down=false, bool hovered=false)
static Q_INVOKABLE QColor gradientStart(const QColor &baseColor)
Contains color groups for each QML item state. \inmodule QtQuick.
Combined button and popup list for selecting options.
constexpr const T & qMin(const T &a, const T &b)
constexpr const T & qMax(const T &a, const T &b)
GLenum GLenum GLsizei const GLuint GLboolean enabled
constexpr int qGray(int r, int g, int b)