mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-27 00:23:55 -06:00
Add styling to the buttons in the printer list.
Contributes to CURA-5942.
This commit is contained in:
parent
406fac9e60
commit
fe7d1825d4
4 changed files with 30 additions and 8 deletions
|
@ -46,6 +46,7 @@ Cura.ExpandableComponent
|
||||||
|
|
||||||
ScrollView
|
ScrollView
|
||||||
{
|
{
|
||||||
|
id: scroll
|
||||||
width: parent.width
|
width: parent.width
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: separator.top
|
anchors.bottom: separator.top
|
||||||
|
@ -54,16 +55,20 @@ Cura.ExpandableComponent
|
||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
id: column
|
id: column
|
||||||
anchors.fill: parent
|
|
||||||
|
// Can't use parent.width since the parent is the flickable component and not the ScrollView
|
||||||
|
width: scroll.width - 2 * UM.Theme.getSize("default_lining").width
|
||||||
|
x: UM.Theme.getSize("default_lining").width
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@label", "Network connected printers")
|
text: catalog.i18nc("@label", "Network connected printers")
|
||||||
visible: networkedPrintersModel.items.length > 0
|
visible: networkedPrintersModel.items.length > 0
|
||||||
|
leftPadding: UM.Theme.getSize("default_margin").width
|
||||||
height: visible ? contentHeight + 2 * UM.Theme.getSize("default_margin").height : 0
|
height: visible ? contentHeight + 2 * UM.Theme.getSize("default_margin").height : 0
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
font: UM.Theme.getFont("medium_bold")
|
font: UM.Theme.getFont("medium")
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text_medium")
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,13 +82,20 @@ Cura.ExpandableComponent
|
||||||
filter: {"type": "machine", "um_network_key": "*", "hidden": "False"}
|
filter: {"type": "machine", "um_network_key": "*", "hidden": "False"}
|
||||||
}
|
}
|
||||||
|
|
||||||
delegate: Button
|
delegate: Cura.ActionButton
|
||||||
{
|
{
|
||||||
text: model.metadata["connect_group_name"]
|
text: model.metadata["connect_group_name"]
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
height: UM.Theme.getSize("action_button").height
|
||||||
checked: Cura.MachineManager.activeMachineNetworkGroupName == model.metadata["connect_group_name"]
|
checked: Cura.MachineManager.activeMachineNetworkGroupName == model.metadata["connect_group_name"]
|
||||||
checkable: true
|
checkable: true
|
||||||
|
|
||||||
|
color: "transparent"
|
||||||
|
hoverColor: UM.Theme.getColor("action_button_hovered")
|
||||||
|
textColor: UM.Theme.getColor("text")
|
||||||
|
textHoverColor: UM.Theme.getColor("text")
|
||||||
|
outlineColor: checked ? UM.Theme.getColor("primary") : "transparent"
|
||||||
|
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
togglePopup()
|
togglePopup()
|
||||||
|
@ -102,10 +114,11 @@ Cura.ExpandableComponent
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@label", "Preset printers")
|
text: catalog.i18nc("@label", "Preset printers")
|
||||||
visible: virtualPrintersModel.items.length > 0
|
visible: virtualPrintersModel.items.length > 0
|
||||||
|
leftPadding: UM.Theme.getSize("default_margin").width
|
||||||
height: visible ? contentHeight + 2 * UM.Theme.getSize("default_margin").height : 0
|
height: visible ? contentHeight + 2 * UM.Theme.getSize("default_margin").height : 0
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
font: UM.Theme.getFont("medium_bold")
|
font: UM.Theme.getFont("medium")
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text_medium")
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,13 +132,20 @@ Cura.ExpandableComponent
|
||||||
filter: {"type": "machine", "um_network_key": null}
|
filter: {"type": "machine", "um_network_key": null}
|
||||||
}
|
}
|
||||||
|
|
||||||
delegate: Button
|
delegate: Cura.ActionButton
|
||||||
{
|
{
|
||||||
text: model.name
|
text: model.name
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
height: UM.Theme.getSize("action_button").height
|
||||||
checked: Cura.MachineManager.activeMachineId == model.id
|
checked: Cura.MachineManager.activeMachineId == model.id
|
||||||
checkable: true
|
checkable: true
|
||||||
|
|
||||||
|
color: "transparent"
|
||||||
|
hoverColor: UM.Theme.getColor("action_button_hovered")
|
||||||
|
textColor: UM.Theme.getColor("text")
|
||||||
|
textHoverColor: UM.Theme.getColor("text")
|
||||||
|
outlineColor: checked ? UM.Theme.getColor("primary") : "transparent"
|
||||||
|
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
togglePopup()
|
togglePopup()
|
||||||
|
|
1
resources/themes/cura-light/images/header_pattern.svg
Normal file
1
resources/themes/cura-light/images/header_pattern.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 310 KiB |
|
@ -521,6 +521,7 @@
|
||||||
|
|
||||||
"avatar_image": [6.8, 6.8],
|
"avatar_image": [6.8, 6.8],
|
||||||
|
|
||||||
|
"action_button": [15.0, 3.0],
|
||||||
"action_button_radius": [0.15, 0.15],
|
"action_button_radius": [0.15, 0.15],
|
||||||
|
|
||||||
"monitor_config_override_box": [1.0, 14.0],
|
"monitor_config_override_box": [1.0, 14.0],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue