mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -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
|
@ -91,7 +91,7 @@ Item
|
|||
|
||||
radius: UM.Theme.getSize("default_radius").width
|
||||
color: UM.Theme.getColor("toolbar_background")
|
||||
|
||||
|
||||
Button
|
||||
{
|
||||
id: openFileButton
|
||||
|
|
|
@ -46,6 +46,7 @@ Cura.ExpandableComponent
|
|||
|
||||
ScrollView
|
||||
{
|
||||
id: scroll
|
||||
width: parent.width
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: separator.top
|
||||
|
@ -54,16 +55,20 @@ Cura.ExpandableComponent
|
|||
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
|
||||
{
|
||||
text: catalog.i18nc("@label", "Network connected printers")
|
||||
visible: networkedPrintersModel.items.length > 0
|
||||
leftPadding: UM.Theme.getSize("default_margin").width
|
||||
height: visible ? contentHeight + 2 * UM.Theme.getSize("default_margin").height : 0
|
||||
renderType: Text.NativeRendering
|
||||
font: UM.Theme.getFont("medium_bold")
|
||||
color: UM.Theme.getColor("text")
|
||||
font: UM.Theme.getFont("medium")
|
||||
color: UM.Theme.getColor("text_medium")
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
|
@ -77,13 +82,20 @@ Cura.ExpandableComponent
|
|||
filter: {"type": "machine", "um_network_key": "*", "hidden": "False"}
|
||||
}
|
||||
|
||||
delegate: Button
|
||||
delegate: Cura.ActionButton
|
||||
{
|
||||
text: model.metadata["connect_group_name"]
|
||||
width: parent.width
|
||||
height: UM.Theme.getSize("action_button").height
|
||||
checked: Cura.MachineManager.activeMachineNetworkGroupName == model.metadata["connect_group_name"]
|
||||
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:
|
||||
{
|
||||
togglePopup()
|
||||
|
@ -102,10 +114,11 @@ Cura.ExpandableComponent
|
|||
{
|
||||
text: catalog.i18nc("@label", "Preset printers")
|
||||
visible: virtualPrintersModel.items.length > 0
|
||||
leftPadding: UM.Theme.getSize("default_margin").width
|
||||
height: visible ? contentHeight + 2 * UM.Theme.getSize("default_margin").height : 0
|
||||
renderType: Text.NativeRendering
|
||||
font: UM.Theme.getFont("medium_bold")
|
||||
color: UM.Theme.getColor("text")
|
||||
font: UM.Theme.getFont("medium")
|
||||
color: UM.Theme.getColor("text_medium")
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
|
@ -119,13 +132,20 @@ Cura.ExpandableComponent
|
|||
filter: {"type": "machine", "um_network_key": null}
|
||||
}
|
||||
|
||||
delegate: Button
|
||||
delegate: Cura.ActionButton
|
||||
{
|
||||
text: model.name
|
||||
width: parent.width
|
||||
height: UM.Theme.getSize("action_button").height
|
||||
checked: Cura.MachineManager.activeMachineId == model.id
|
||||
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:
|
||||
{
|
||||
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],
|
||||
|
||||
"action_button": [15.0, 3.0],
|
||||
"action_button_radius": [0.15, 0.15],
|
||||
|
||||
"monitor_config_override_box": [1.0, 14.0],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue