refactor: Remove and update usage of StatusSlider to its StausQ Component
closes #3896
This commit is contained in:
parent
ef4934cee4
commit
781f86bd60
|
@ -11,6 +11,7 @@ import "../../../../shared/status"
|
|||
import "../../Chat/views"
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Controls 0.1 as StatusQ
|
||||
|
||||
import "../popups"
|
||||
|
||||
|
@ -121,13 +122,13 @@ ScrollView {
|
|||
text: qsTrId("change-font-size")
|
||||
}
|
||||
|
||||
StatusSlider {
|
||||
StatusQ.StatusSlider {
|
||||
id: fontSizeSlider
|
||||
anchors.top: labelFontSize.bottom
|
||||
anchors.topMargin: Style.current.padding
|
||||
width: parent.width
|
||||
minimumValue: 0
|
||||
maximumValue: 5
|
||||
from: 0
|
||||
to: 5
|
||||
stepSize: 1
|
||||
value: appSettings.fontSize
|
||||
onValueChanged: {
|
||||
|
@ -201,7 +202,7 @@ ScrollView {
|
|||
text: qsTr("Change Zoom (requires restart)")
|
||||
}
|
||||
|
||||
StatusSlider {
|
||||
StatusQ.StatusSlider {
|
||||
id: zoomSlider
|
||||
readonly property int initialValue: {
|
||||
let scaleFactorStr = root.store.readTextFile(uiScaleFilePath)
|
||||
|
@ -217,8 +218,8 @@ ScrollView {
|
|||
anchors.top: labelZoom.bottom
|
||||
anchors.topMargin: Style.current.padding
|
||||
width: parent.width
|
||||
minimumValue: 50
|
||||
maximumValue: 200
|
||||
from: 50
|
||||
to: 200
|
||||
stepSize: 50
|
||||
value: initialValue
|
||||
onValueChanged: {
|
||||
|
|
|
@ -3,9 +3,9 @@ import QtQuick.Controls 2.13
|
|||
import QtQuick.Layouts 1.13
|
||||
|
||||
import utils 1.0
|
||||
import "../../../../shared/status"
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Controls 0.1
|
||||
|
||||
Item {
|
||||
id: soundsContainer
|
||||
|
@ -35,8 +35,8 @@ Item {
|
|||
anchors.topMargin: Style.current.padding
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 24
|
||||
minimumValue: 0.0
|
||||
maximumValue: 1.0
|
||||
from: 0.0
|
||||
to: 1.0
|
||||
value: appSettings.volume
|
||||
stepSize: 0.1
|
||||
onValueChanged: {
|
||||
|
@ -45,9 +45,3 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*##^##
|
||||
Designer {
|
||||
D{i:0;autoSize:true;height:480;width:640}
|
||||
}
|
||||
##^##*/
|
||||
|
|
|
@ -1,55 +0,0 @@
|
|||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -10,7 +10,6 @@ StatusGifColumn 1.0 StatusGifColumn.qml
|
|||
StatusImageIdenticon 1.0 StatusImageIdenticon.qml
|
||||
StatusRoundButton 1.0 StatusRoundButton.qml
|
||||
StatusSectionHeadline 1.0 StatusSectionHeadline.qml
|
||||
StatusSlider 1.0 StatusSlider.qml
|
||||
StatusStickerButton 1.0 StatusStickerButton.qml
|
||||
StatusStickerList 1.0 StatusStickerList.qml
|
||||
StatusStickerMarket 1.0 StatusStickerMarket.qml
|
||||
|
|
Loading…
Reference in New Issue