mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 14:44:13 -06:00
Add grey border between extruder boxes
This is done by fitting tightly a rectangle around the grid of boxes. The boxes themselves have a white background but there is spacing between the boxes, which results in the little border. Contributes to issue CURA-3161.
This commit is contained in:
parent
9546c85967
commit
687cdcc30e
1 changed files with 36 additions and 29 deletions
|
@ -68,41 +68,48 @@ Column
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GridLayout
|
Rectangle
|
||||||
{
|
{
|
||||||
id: extrudersGrid
|
color: UM.Theme.getColor("sidebar_lining")
|
||||||
columns: 2
|
|
||||||
columnSpacing: UM.Theme.getSize("sidebar_lining_thin").width
|
|
||||||
rowSpacing: UM.Theme.getSize("sidebar_lining_thin").height
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
height: childrenRect.height
|
||||||
|
|
||||||
Repeater
|
GridLayout
|
||||||
{
|
{
|
||||||
model: machineExtruderCount.properties.value
|
id: extrudersGrid
|
||||||
delegate: Rectangle
|
columns: 2
|
||||||
{
|
columnSpacing: UM.Theme.getSize("sidebar_lining_thin").width
|
||||||
id: extruderRectangle
|
rowSpacing: UM.Theme.getSize("sidebar_lining_thin").height
|
||||||
color: UM.Theme.getColor("sidebar")
|
width: parent.width
|
||||||
width: extrudersGrid.width / 2 - UM.Theme.getSize("sidebar_lining_thin").width / 2
|
|
||||||
height: UM.Theme.getSize("sidebar_extruder_box").height
|
|
||||||
|
|
||||||
Text //Extruder name.
|
Repeater
|
||||||
|
{
|
||||||
|
model: machineExtruderCount.properties.value
|
||||||
|
delegate: Rectangle
|
||||||
{
|
{
|
||||||
text: machineExtruderCount.properties.value > 1 ? extrudersModel.getItem(index).name : catalog.i18nc("@label", "Hotend")
|
id: extruderRectangle
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("sidebar")
|
||||||
anchors.left: parent.left
|
width: extrudersGrid.width / 2 - UM.Theme.getSize("sidebar_lining_thin").width / 2
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
height: UM.Theme.getSize("sidebar_extruder_box").height
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
Text //Extruder name.
|
||||||
}
|
{
|
||||||
Text //Temperature indication.
|
text: machineExtruderCount.properties.value > 1 ? extrudersModel.getItem(index).name : catalog.i18nc("@label", "Hotend")
|
||||||
{
|
color: UM.Theme.getColor("text")
|
||||||
text: printerConnected ? Math.round(connectedPrinter.hotendTemperatures[index]) + "°C" : ""
|
anchors.left: parent.left
|
||||||
font: UM.Theme.getFont("large")
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
anchors.right: parent.right
|
anchors.top: parent.top
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||||
anchors.top: parent.top
|
}
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
Text //Temperature indication.
|
||||||
|
{
|
||||||
|
text: printerConnected ? Math.round(connectedPrinter.hotendTemperatures[index]) + "°C" : ""
|
||||||
|
font: UM.Theme.getFont("large")
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue