Skip to content

Commit

Permalink
QML: use GzDoubleSpinBox
Browse files Browse the repository at this point in the history
-  Use implementation from https://github.com/mpaperno/maxLibQt

Signed-off-by: Rhys Mainwaring <[email protected]>
  • Loading branch information
srmainwaring committed Sep 3, 2023
1 parent ebbf619 commit e539b39
Show file tree
Hide file tree
Showing 11 changed files with 511 additions and 50 deletions.
12 changes: 6 additions & 6 deletions examples/plugin/gz_components/GzComponents.qml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ Column {
spacing: 2

// Integer spin box
GzSpinBox {
minimumValue: -2
maximumValue: 19
GzDoubleSpinBox {
from: -2
to: 19
decimals: 0
stepSize: 3
value: 5
}

// Double spin box
GzSpinBox {
minimumValue: -2.5
maximumValue: 19.3
GzDoubleSpinBox {
from: -2.5
to: 19.3
decimals: 4
stepSize: 3.6
value: 5.8
Expand Down
12 changes: 6 additions & 6 deletions include/gz/gui/qml/GzCardSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ Dialog {
}
}

GzSpinBox {
GzDoubleSpinBox {
visible: !cardPane.anchored
maximumValue: cardPane.parent ? cardPane.parent.width - cardPane.width : minSize
to: cardPane.parent ? cardPane.parent.width - cardPane.width : minSize
onVisibleChanged: value = cardPane.x
onValueChanged: {
cardPane.x = value;
Expand All @@ -145,9 +145,9 @@ Dialog {
visible: !cardPane.anchored
text: "X"
}
GzSpinBox {
GzDoubleSpinBox {
visible: !cardPane.anchored
maximumValue: cardPane.parent ? cardPane.parent.height - cardPane.height : minSize
to: cardPane.parent ? cardPane.parent.height - cardPane.height : minSize
onVisibleChanged: value = cardPane.y
onValueChanged: {
cardPane.y = value;
Expand All @@ -157,9 +157,9 @@ Dialog {
visible: !cardPane.anchored
text: "Y"
}
GzSpinBox {
GzDoubleSpinBox {
visible: !cardPane.anchored
maximumValue: 10000
to: 10000
onVisibleChanged: value = cardPane.z
onValueChanged: {
cardPane.z = value;
Expand Down
Loading

0 comments on commit e539b39

Please sign in to comment.