diff options
author | Maximilian Goldstein <max.goldstein@qt.io> | 2020-04-08 14:35:21 +0200 |
---|---|---|
committer | Maximilian Goldstein <max.goldstein@qt.io> | 2020-04-14 14:46:19 +0200 |
commit | 53aa259d57e92f48585f95b47a25ee6e16fc2aaa (patch) | |
tree | b3e27b6ee5ca5b8fdfb4d1e084e50ebd151fc0bc /src/qml/qml/qqmlglobal_p.h | |
parent | 27748dec471a9c9825f5a35d1936bb5d00400b5b (diff) |
Implement Qt.alpha()
Introduces an easy way to get a version of a color with transparency
(e.g. Qt.alpha("red", 0.5)).
[ChangeLog][QML][General] Added Qt.alpha for easily modifying a color's alpha value
Task-number: QTBUG-77635
Change-Id: Ic724e5fa503ca2ae5157a99eed1b5c913a39239f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlglobal_p.h')
-rw-r--r-- | src/qml/qml/qqmlglobal_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlglobal_p.h b/src/qml/qml/qqmlglobal_p.h index 3c540a6124..b0f239e398 100644 --- a/src/qml/qml/qqmlglobal_p.h +++ b/src/qml/qml/qqmlglobal_p.h @@ -278,6 +278,7 @@ public: virtual QVariant fromHsvF(double, double, double, double); virtual QVariant lighter(const QVariant &, qreal); virtual QVariant darker(const QVariant &, qreal); + virtual QVariant alpha(const QVariant &, qreal); virtual QVariant tint(const QVariant &, const QVariant &); }; |