harbour-batterybuddy/application/qml/components/AdjustmentButtons.qml
2021-04-10 01:31:03 +03:00

67 lines
1.8 KiB
QML

import QtQuick 2.2
import Sailfish.Silica 1.0
Row {
property MySlider targetSlider
property int smallChange
property int largeChange
anchors {
left: parent.left
right: parent.right
leftMargin: Theme.paddingLarge
rightMargin: Theme.paddingLarge
}
height: minusFive.height + Theme.paddingLarge
Column {
width: parent.width / 4
Button {
id: minusFive
width: parent.width - Theme.paddingMedium
anchors.horizontalCenter: parent.horizontalCenter
text: "<<"
onClicked: {
targetSlider.changeValue(-largeChange)
targetSlider.saveTimer.restart()
}
}
}
Column {
width: parent.width / 4
Button {
id: minusOne
width: parent.width - Theme.paddingMedium
anchors.horizontalCenter: parent.horizontalCenter
text: "<"
onClicked: {
targetSlider.changeValue(-smallChange)
targetSlider.saveTimer.restart()
}
}
}Column {
width: parent.width / 4
Button {
id: plusOne
width: parent.width - Theme.paddingMedium
anchors.horizontalCenter: parent.horizontalCenter
text: ">"
onClicked: {
targetSlider.changeValue(smallChange)
targetSlider.saveTimer.restart()
}
}
}
Column {
width: parent.width / 4
Button {
id: plusFive
width: parent.width - Theme.paddingMedium
anchors.horizontalCenter: parent.horizontalCenter
text: ">>"
onClicked: {
targetSlider.changeValue(largeChange)
targetSlider.saveTimer.restart()
}
}
}
}