mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -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
|
@ -138,13 +138,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: Math.floor(UM.Theme.getSize("setting_control").width * 0.75)
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
visible: extruderModel != null ? extruderModel.canPreHeatHotends: true
|
||||
width: UM.Theme.getSize("monitor_preheat_temperature_control").width
|
||||
height: UM.Theme.getSize("monitor_preheat_temperature_control").height
|
||||
visible: extruderModel != null ? extruderModel.canPreHeatHotends && !extruderModel.isPreheating : true
|
||||
Rectangle //Highlight of input field.
|
||||
{
|
||||
anchors.fill: parent
|
||||
|
@ -175,6 +175,17 @@ 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
|
||||
|
@ -186,7 +197,7 @@ Item
|
|||
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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -379,6 +379,8 @@
|
|||
"save_button_save_to_button": [0.3, 2.7],
|
||||
"save_button_specs_icons": [1.4, 1.4],
|
||||
|
||||
"monitor_preheat_temperature_control": [4.5, 2.0],
|
||||
|
||||
"modal_window_minimum": [60.0, 45],
|
||||
"license_window_minimum": [45, 45],
|
||||
"wizard_progress": [10.0, 0.0],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue