mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-30 19:15:12 +08:00
Merge branch 'CURA-8980_fix_monitor_buttons' of github.com:Ultimaker/Cura into replace_controls_1_for_controls_2
This commit is contained in:
commit
96751a0cc0
@ -183,8 +183,8 @@ Item
|
|||||||
UM.ProgressBar
|
UM.ProgressBar
|
||||||
{
|
{
|
||||||
id: progressBar
|
id: progressBar
|
||||||
minimumValue: 0
|
from: 0
|
||||||
maximumValue: 100
|
to: 100
|
||||||
value: 0
|
value: 0
|
||||||
|
|
||||||
//Doing this in an explicit binding since the implicit binding breaks on occasion.
|
//Doing this in an explicit binding since the implicit binding breaks on occasion.
|
||||||
|
@ -98,6 +98,7 @@ Item
|
|||||||
Layout.preferredWidth: _buttonSize
|
Layout.preferredWidth: _buttonSize
|
||||||
Layout.preferredHeight: _buttonSize
|
Layout.preferredHeight: _buttonSize
|
||||||
iconSource: UM.Theme.getIcon("ChevronSingleUp")
|
iconSource: UM.Theme.getIcon("ChevronSingleUp")
|
||||||
|
leftPadding: (Layout.preferredWidth - iconSize) / 2
|
||||||
|
|
||||||
onClicked: printerModel.moveHead(0, distancesRow.currentDistance, 0)
|
onClicked: printerModel.moveHead(0, distancesRow.currentDistance, 0)
|
||||||
}
|
}
|
||||||
@ -109,6 +110,7 @@ Item
|
|||||||
Layout.preferredWidth: _buttonSize
|
Layout.preferredWidth: _buttonSize
|
||||||
Layout.preferredHeight: _buttonSize
|
Layout.preferredHeight: _buttonSize
|
||||||
iconSource: UM.Theme.getIcon("ChevronSingleLeft")
|
iconSource: UM.Theme.getIcon("ChevronSingleLeft")
|
||||||
|
leftPadding: (Layout.preferredWidth - iconSize) / 2
|
||||||
|
|
||||||
onClicked: printerModel.moveHead(-distancesRow.currentDistance, 0, 0)
|
onClicked: printerModel.moveHead(-distancesRow.currentDistance, 0, 0)
|
||||||
}
|
}
|
||||||
@ -120,6 +122,7 @@ Item
|
|||||||
Layout.preferredWidth: _buttonSize
|
Layout.preferredWidth: _buttonSize
|
||||||
Layout.preferredHeight: _buttonSize
|
Layout.preferredHeight: _buttonSize
|
||||||
iconSource: UM.Theme.getIcon("ChevronSingleRight")
|
iconSource: UM.Theme.getIcon("ChevronSingleRight")
|
||||||
|
leftPadding: (Layout.preferredWidth - iconSize) / 2
|
||||||
|
|
||||||
onClicked: printerModel.moveHead(distancesRow.currentDistance, 0, 0)
|
onClicked: printerModel.moveHead(distancesRow.currentDistance, 0, 0)
|
||||||
}
|
}
|
||||||
@ -131,6 +134,7 @@ Item
|
|||||||
Layout.preferredWidth: _buttonSize
|
Layout.preferredWidth: _buttonSize
|
||||||
Layout.preferredHeight: _buttonSize
|
Layout.preferredHeight: _buttonSize
|
||||||
iconSource: UM.Theme.getIcon("ChevronSingleDown")
|
iconSource: UM.Theme.getIcon("ChevronSingleDown")
|
||||||
|
leftPadding: (Layout.preferredWidth - iconSize) / 2
|
||||||
|
|
||||||
onClicked: printerModel.moveHead(0, -distancesRow.currentDistance, 0)
|
onClicked: printerModel.moveHead(0, -distancesRow.currentDistance, 0)
|
||||||
}
|
}
|
||||||
@ -142,6 +146,7 @@ Item
|
|||||||
Layout.preferredWidth: _buttonSize
|
Layout.preferredWidth: _buttonSize
|
||||||
Layout.preferredHeight: _buttonSize
|
Layout.preferredHeight: _buttonSize
|
||||||
iconSource: UM.Theme.getIcon("House")
|
iconSource: UM.Theme.getIcon("House")
|
||||||
|
leftPadding: (Layout.preferredWidth - iconSize) / 2
|
||||||
|
|
||||||
onClicked: printerModel.homeHead()
|
onClicked: printerModel.homeHead()
|
||||||
}
|
}
|
||||||
@ -166,6 +171,7 @@ Item
|
|||||||
iconSource: UM.Theme.getIcon("ChevronSingleUp")
|
iconSource: UM.Theme.getIcon("ChevronSingleUp")
|
||||||
width: height
|
width: height
|
||||||
height: _buttonSize
|
height: _buttonSize
|
||||||
|
leftPadding: (width - iconSize) / 2
|
||||||
|
|
||||||
onClicked: printerModel.moveHead(0, 0, distancesRow.currentDistance)
|
onClicked: printerModel.moveHead(0, 0, distancesRow.currentDistance)
|
||||||
|
|
||||||
@ -176,6 +182,7 @@ Item
|
|||||||
iconSource: UM.Theme.getIcon("House")
|
iconSource: UM.Theme.getIcon("House")
|
||||||
width: height
|
width: height
|
||||||
height: _buttonSize
|
height: _buttonSize
|
||||||
|
leftPadding: (width - iconSize) / 2
|
||||||
|
|
||||||
onClicked: printerModel.homeBed()
|
onClicked: printerModel.homeBed()
|
||||||
}
|
}
|
||||||
@ -185,6 +192,7 @@ Item
|
|||||||
iconSource: UM.Theme.getIcon("ChevronSingleDown")
|
iconSource: UM.Theme.getIcon("ChevronSingleDown")
|
||||||
width: height
|
width: height
|
||||||
height: _buttonSize
|
height: _buttonSize
|
||||||
|
leftPadding: (width - iconSize) / 2
|
||||||
|
|
||||||
onClicked: printerModel.moveHead(0, 0, -distancesRow.currentDistance)
|
onClicked: printerModel.moveHead(0, 0, -distancesRow.currentDistance)
|
||||||
}
|
}
|
||||||
@ -218,15 +226,15 @@ Item
|
|||||||
Repeater
|
Repeater
|
||||||
{
|
{
|
||||||
model: distancesModel
|
model: distancesModel
|
||||||
delegate: Button
|
delegate: Cura.SecondaryButton
|
||||||
{
|
{
|
||||||
height: UM.Theme.getSize("setting_control").height
|
height: UM.Theme.getSize("setting_control").height
|
||||||
width: height + UM.Theme.getSize("default_margin").width
|
|
||||||
|
|
||||||
text: model.label
|
text: model.label
|
||||||
ButtonGroup.group: distanceGroup
|
ButtonGroup.group: distanceGroup
|
||||||
checkable: true
|
color: distancesRow.currentDistance == model.value ? UM.Theme.getColor("primary_button") : UM.Theme.getColor("secondary_button")
|
||||||
checked: distancesRow.currentDistance == model.value
|
textColor: distancesRow.currentDistance == model.value ? UM.Theme.getColor("primary_button_text"): UM.Theme.getColor("secondary_button_text")
|
||||||
|
hoverColor: distancesRow.currentDistance == model.value ? UM.Theme.getColor("primary_button_hover"): UM.Theme.getColor("secondary_button_hover")
|
||||||
onClicked: distancesRow.currentDistance = model.value
|
onClicked: distancesRow.currentDistance = model.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user