diff options
author | Paweł Gronowski <a4b8231fbf6d87ff4c04@woland.xyz> | 2020-03-06 19:25:42 +0100 |
---|---|---|
committer | Paweł Gronowski <a4b8231fbf6d87ff4c04@woland.xyz> | 2020-03-17 12:09:03 +0100 |
commit | 0d5a43fa84ffe298d028aded4478d5e388d58298 (patch) | |
tree | 92693dcab5591fcad23ddc927945c308518e3c5c /src/imports/controls/material/Slider.qml | |
parent | 8a442c3b7709424c768a99b304bdbdbac81f8011 (diff) |
Material: Change slider's color to grey when not enabled
When Slider was not enabled it would look exactly the same as when
enabled.
[ChangeLog][Controls][Material] Add visual distinction between an
enabled and not enabled slider.
Task-number: QTBUG-70768
Change-Id: If0d7e5adc19d8bc22a810cb2ba4e57b657ab48d4
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/material/Slider.qml')
-rw-r--r-- | src/imports/controls/material/Slider.qml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/imports/controls/material/Slider.qml b/src/imports/controls/material/Slider.qml index cc6a1413..8c1ef12e 100644 --- a/src/imports/controls/material/Slider.qml +++ b/src/imports/controls/material/Slider.qml @@ -65,8 +65,8 @@ T.Slider { implicitHeight: control.horizontal ? 48 : 200 width: control.horizontal ? control.availableWidth : 1 height: control.horizontal ? 1 : control.availableHeight - color: control.Material.foreground scale: control.horizontal && control.mirrored ? -1 : 1 + color: control.enabled ? control.Material.foreground : control.Material.sliderDisabledColor Rectangle { x: control.horizontal ? 0 : (parent.width - width) / 2 @@ -74,7 +74,7 @@ T.Slider { width: control.horizontal ? control.position * parent.width : 3 height: control.horizontal ? 3 : control.position * parent.height - color: control.Material.accentColor + color: control.enabled ? control.Material.accentColor : control.Material.sliderDisabledColor } } } |