mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 05:23:58 -06:00
Tweak 2.4 sidebar changes
* Make extruder-tabs more clear on badly calibrated displays * Make infill selection same width as other "Recommended" controls * Move printer selection to the top bar * Add animation to support extruder selection combobox
This commit is contained in:
parent
7694b8f128
commit
e642b4ebe9
4 changed files with 84 additions and 53 deletions
|
@ -21,46 +21,6 @@ Column
|
|||
signal showTooltip(Item item, point location, string text)
|
||||
signal hideTooltip()
|
||||
|
||||
Row
|
||||
{
|
||||
id: machineSelectionRow
|
||||
height: UM.Theme.getSize("sidebar_setup").height
|
||||
|
||||
anchors
|
||||
{
|
||||
left: parent.left
|
||||
leftMargin: UM.Theme.getSize("default_margin").width
|
||||
right: parent.right
|
||||
rightMargin: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
id: machineSelectionLabel
|
||||
text: catalog.i18nc("@label:listbox", "Printer:");
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
font: UM.Theme.getFont("default");
|
||||
color: UM.Theme.getColor("text");
|
||||
|
||||
width: parent.width * 0.45 - UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
|
||||
ToolButton
|
||||
{
|
||||
id: machineSelection
|
||||
text: Cura.MachineManager.activeMachineName;
|
||||
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
tooltip: Cura.MachineManager.activeMachineName
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
style: UM.Theme.styles.sidebar_header_button
|
||||
|
||||
width: parent.width * 0.55 + UM.Theme.getSize("default_margin").width
|
||||
|
||||
menu: PrinterMenu { }
|
||||
}
|
||||
}
|
||||
|
||||
Row
|
||||
{
|
||||
id: extruderSelectionRow
|
||||
|
@ -86,6 +46,7 @@ Column
|
|||
property var index: 0
|
||||
|
||||
height: UM.Theme.getSize("sidebar_header_mode_tabs").height
|
||||
width: parent.width
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
|
||||
anchors
|
||||
|
@ -141,6 +102,17 @@ Column
|
|||
control.hovered ? UM.Theme.getColor("tab_hovered") : UM.Theme.getColor("tab_unchecked")
|
||||
Behavior on color { ColorAnimation { duration: 50; } }
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: highlight
|
||||
visible: control.checked
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
height: UM.Theme.getSize("sidebar_header_highlight").height
|
||||
color: UM.Theme.getColor("sidebar_header_bar")
|
||||
}
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: swatch
|
||||
|
@ -179,6 +151,14 @@ Column
|
|||
}
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
id: variantRowSpacer
|
||||
height: UM.Theme.getSize("default_margin").height / 4
|
||||
width: height
|
||||
visible: !extruderSelectionRow.visible
|
||||
}
|
||||
|
||||
Row
|
||||
{
|
||||
id: variantRow
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue