Skip to content

Commit

Permalink
[QgsQuick] Small visual fixes of a range widget
Browse files Browse the repository at this point in the history
  • Loading branch information
vsklencar authored and wonder-sk committed Jul 30, 2019
1 parent 1a414ef commit a9db87a
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions src/quickgui/plugin/editor/qgsquickrange.qml
Expand Up @@ -52,8 +52,6 @@ Item {
Row {
id: rowLayout
anchors.fill: parent
anchors.rightMargin: fieldItem.customMargin
anchors.leftMargin: fieldItem.customMargin

// SpinBox
SpinBox {
Expand All @@ -72,6 +70,14 @@ Item {
editable: true
visible: fieldItem.widgetStyle === "SpinBox"

background: Rectangle {
anchors.fill: parent
border.color: customStyle.fields.normalColor
border.width: 1 * QgsQuick.Utils.dp
color: customStyle.fields.backgroundColor
radius: customStyle.fields.cornerRadius
}

onValueChanged: {
if (visible) {
fieldItem.valueChanged(spinbox.value / multiplier, false)
Expand Down Expand Up @@ -117,6 +123,14 @@ Item {
validator: spinbox.validator
inputMethodHints: Qt.ImhFormattedNumbersOnly
}

Component.onCompleted: {
up.indicator.color = customStyle.fields.backgroundColor
up.indicator.radius = customStyle.fields.cornerRadius
down.indicator.radius = customStyle.fields.cornerRadius
down.indicator.color = customStyle.fields.backgroundColor
}

}

// Slider
Expand All @@ -131,8 +145,7 @@ Item {
horizontalAlignment: Text.AlignLeft
font.pixelSize: customStyle.fields.fontPixelSize
color: customStyle.fields.fontColor
topPadding: fieldItem.customMargin
bottomPadding: fieldItem.customMargin
padding: fieldItem.customMargin
}

Slider {
Expand Down

0 comments on commit a9db87a

Please sign in to comment.