X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=imports%2Fqtquickcontrols2aglstyle%2FSlider.qml;h=5b6a4956d0b738281b8c7ae0098c011e861ea10c;hb=refs%2Ftags%2Fflounder_5.99.1;hp=6c9863b3a0df5511f3e4983f8381a2d82ec282ec;hpb=244bd4cd8c49a4bbe5e283f75607e588579aa81b;p=src%2Fqtquickcontrols2-agl-style.git diff --git a/imports/qtquickcontrols2aglstyle/Slider.qml b/imports/qtquickcontrols2aglstyle/Slider.qml index 6c9863b..5b6a495 100644 --- a/imports/qtquickcontrols2aglstyle/Slider.qml +++ b/imports/qtquickcontrols2aglstyle/Slider.qml @@ -16,6 +16,7 @@ import QtQuick 2.6 import QtQuick.Templates 2.0 as T +import QtGraphicalEffects 1.0 T.Slider { id: root @@ -31,15 +32,18 @@ T.Slider { color: "#666666" Rectangle { - rotation: -90 - transformOrigin: Item.TopLeft - y: parent.height - width: parent.height - height: handle.x + handle.width - radius: width / 2 - gradient: Gradient { - GradientStop { position: 0.0; color: '#59FF7F' } - GradientStop { position: 1.0; color: '#6BFBFF' } + height: parent.height + width: handle.x + handle.width + radius: height / 2 + + layer.enabled: true + layer.effect: LinearGradient { + start: Qt.point(0, 0) + end: Qt.point(background.width, 0) + gradient: Gradient { + GradientStop { position: 0.0; color: "#00ADDC" } + GradientStop { position: 1.0; color: "#6BFBFF" } + } } } }