mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 15:13:56 -06:00
Add unit to preheat temperature boxes
This commit is contained in:
parent
6e0717a967
commit
7994c95bbe
3 changed files with 37 additions and 13 deletions
|
@ -122,13 +122,13 @@ Item
|
|||
}
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : preheatTemperatureInputMouseArea.containsMouse ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border")
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.right: preheatButton.left
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: UM.Theme.getSize("default_margin").height
|
||||
width: UM.Theme.getSize("setting_control").width
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
visible: printerModel != null ? printerModel.canPreHeatBed: true
|
||||
width: UM.Theme.getSize("monitor_preheat_temperature_control").width
|
||||
height: UM.Theme.getSize("monitor_preheat_temperature_control").height
|
||||
visible: printerModel != null ? printerModel.canPreHeatBed && !printerModel.isPreheating : true
|
||||
Rectangle //Highlight of input field.
|
||||
{
|
||||
anchors.fill: parent
|
||||
|
@ -159,18 +159,29 @@ Item
|
|||
}
|
||||
}
|
||||
}
|
||||
Label
|
||||
{
|
||||
id: unit
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: UM.Theme.getSize("setting_unit_margin").width
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
text: "°C";
|
||||
color: UM.Theme.getColor("setting_unit")
|
||||
font: UM.Theme.getFont("default")
|
||||
}
|
||||
TextInput
|
||||
{
|
||||
id: preheatTemperatureInput
|
||||
font: UM.Theme.getFont("default")
|
||||
color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text")
|
||||
selectByMouse: true
|
||||
maximumLength: 10
|
||||
maximumLength: 5
|
||||
enabled: parent.enabled
|
||||
validator: RegExpValidator { regExp: /^-?[0-9]{0,9}[.,]?[0-9]{0,10}$/ } //Floating point regex.
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("setting_unit_margin").width
|
||||
anchors.right: parent.right
|
||||
anchors.right: unit.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
renderType: Text.NativeRendering
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue