mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-12 23:35:32 +00:00
4ee21ada05
Introduced Style.svg() Style.png() Style.emoji() and Style.icon() in Style.qml. Those should be used to set the source in Images instead of using relative paths. Usage: Image { source: Style.svg("check) .... Also moved all Singletons inside a new "utils" folder and made it a QML module, to use import utils 1.0 instead of relative paths Closes #3678
56 lines
2.0 KiB
QML
56 lines
2.0 KiB
QML
import QtQuick 2.13
|
|
import QtQuick.Controls.Styles 1.4
|
|
import QtGraphicalEffects 1.13
|
|
import QtQuick.Controls 1.4 as QQC1
|
|
|
|
import utils 1.0
|
|
|
|
QQC1.Slider {
|
|
id: slider
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
wheelEnabled: false
|
|
style: SliderStyle {
|
|
groove: Rectangle {
|
|
implicitHeight: 4
|
|
color: {
|
|
if (control.value === control.maximumValue) {
|
|
return Style.current.blue
|
|
}
|
|
return Style.current.lightBlue
|
|
}
|
|
radius: 10
|
|
Rectangle {
|
|
radius: 10
|
|
anchors.fill: parent
|
|
visible: control.value > control.minimumValue && control.value < control.maximumValue
|
|
gradient: Gradient {
|
|
GradientStop { color: Style.current.blue ; position: 0 }
|
|
GradientStop { color: Style.current.lightBlue ; position: (((control.value - control.minimumValue)*100)/(control.maximumValue - control.minimumValue)/100).toFixed(2) }
|
|
GradientStop { color: Style.current.blue ; position: (((control.value - control.minimumValue)*100)/(control.maximumValue - control.minimumValue)/100).toFixed(2) }
|
|
GradientStop { color: Style.current.lightBlue ; position: 1 }
|
|
orientation: Gradient.Horizontal
|
|
}
|
|
}
|
|
}
|
|
handle: Rectangle {
|
|
anchors.centerIn: parent
|
|
color: control.pressed ? Style.current.grey : Style.current.white
|
|
implicitWidth: 28
|
|
implicitHeight: 28
|
|
radius: 14
|
|
layer.enabled: true
|
|
layer.effect: DropShadow {
|
|
width: parent.width
|
|
height: parent.height
|
|
visible: true
|
|
verticalOffset: 2
|
|
samples: 15
|
|
fast: true
|
|
cached: true
|
|
color: "#22000000"
|
|
}
|
|
}
|
|
}
|
|
}
|