summaryrefslogtreecommitdiff
path: root/src/controls/Styles/Base/StatusIndicatorStyle.qml
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@theqtcompany.com>2015-08-14 14:45:28 +0200
committerMitch Curtis <mitch.curtis@theqtcompany.com>2015-11-05 17:03:33 +0000
commit29f1e31c673123ce49c59f0feeea39f19a5707e7 (patch)
treec0b0a281db5c79a6b7b950e0fd2e52d284da832e /src/controls/Styles/Base/StatusIndicatorStyle.qml
parenta68b58a35aeafad279236d31c28acda02baff5cf (diff)
downloadqtquickcontrols-29f1e31c673123ce49c59f0feeea39f19a5707e7.tar.gz
Extras: fix DropShadow usage.
It's now recommended to use the samples property instead of radius. The radius property is calculated for us based on the samples. Task-number: QTBUG-47749 Change-Id: Ic29c91a1ca9961c74a6ad727ff7c9c671bf55929 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/controls/Styles/Base/StatusIndicatorStyle.qml')
-rw-r--r--src/controls/Styles/Base/StatusIndicatorStyle.qml8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/controls/Styles/Base/StatusIndicatorStyle.qml b/src/controls/Styles/Base/StatusIndicatorStyle.qml
index 4366d1f7..bd539db3 100644
--- a/src/controls/Styles/Base/StatusIndicatorStyle.qml
+++ b/src/controls/Styles/Base/StatusIndicatorStyle.qml
@@ -73,7 +73,6 @@ Style {
property Component indicator: Item {
readonly property real shineStep: 0.05
readonly property real smallestAxis: Math.min(control.width, control.height)
- readonly property real shadowRadius: smallestAxis * 0.4
readonly property real outerRecessPercentage: 0.11
readonly property color offColor: Qt.rgba(0.13, 0.13, 0.13)
readonly property color baseColor: control.active ? control.color : offColor
@@ -113,12 +112,12 @@ Style {
Item {
id: shadowGuard
anchors.fill: backgroundCanvas
- anchors.margins: -shadowRadius
+ anchors.margins: -shadow.radius
Canvas {
id: colorCanvas
anchors.fill: parent
- anchors.margins: shadowRadius
+ anchors.margins: shadow.radius
Connections {
target: control
@@ -144,9 +143,6 @@ Style {
id: shadow
source: shadowGuard
color: control.color
- // Don't set fast here because Qt < 5.3 will run into QTBUG-36931
- radius: shadowRadius
- samples: Math.min(32, radius)
cached: true
anchors.fill: shadowGuard
visible: control.active