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.cpp | |
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.cpp')
-rw-r--r-- | src/qml/qml/qqmlglobal.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlglobal.cpp b/src/qml/qml/qqmlglobal.cpp index acebb6bac3..b6a1075c67 100644 --- a/src/qml/qml/qqmlglobal.cpp +++ b/src/qml/qml/qqmlglobal.cpp @@ -283,6 +283,10 @@ QVariant QQmlColorProvider::fromHslF(double, double, double, double) { return QV QVariant QQmlColorProvider::fromHsvF(double, double, double, double) { return QVariant(); } QVariant QQmlColorProvider::lighter(const QVariant &, qreal) { return QVariant(); } QVariant QQmlColorProvider::darker(const QVariant &, qreal) { return QVariant(); } +QVariant QQmlColorProvider::alpha(const QVariant &, qreal) +{ + return QVariant(); +} QVariant QQmlColorProvider::tint(const QVariant &, const QVariant &) { return QVariant(); } static QQmlColorProvider *colorProvider = nullptr; |