mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-13 22:03:11 +08: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
@ -68,41 +68,48 @@ Column
|
||||
}
|
||||
}
|
||||
|
||||
GridLayout
|
||||
Rectangle
|
||||
{
|
||||
id: extrudersGrid
|
||||
columns: 2
|
||||
columnSpacing: UM.Theme.getSize("sidebar_lining_thin").width
|
||||
rowSpacing: UM.Theme.getSize("sidebar_lining_thin").height
|
||||
color: UM.Theme.getColor("sidebar_lining")
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
|
||||
Repeater
|
||||
GridLayout
|
||||
{
|
||||
model: machineExtruderCount.properties.value
|
||||
delegate: Rectangle
|
||||
{
|
||||
id: extruderRectangle
|
||||
color: UM.Theme.getColor("sidebar")
|
||||
width: extrudersGrid.width / 2 - UM.Theme.getSize("sidebar_lining_thin").width / 2
|
||||
height: UM.Theme.getSize("sidebar_extruder_box").height
|
||||
id: extrudersGrid
|
||||
columns: 2
|
||||
columnSpacing: UM.Theme.getSize("sidebar_lining_thin").width
|
||||
rowSpacing: UM.Theme.getSize("sidebar_lining_thin").height
|
||||
width: parent.width
|
||||
|
||||
Text //Extruder name.
|
||||
Repeater
|
||||
{
|
||||
model: machineExtruderCount.properties.value
|
||||
delegate: Rectangle
|
||||
{
|
||||
text: machineExtruderCount.properties.value > 1 ? extrudersModel.getItem(index).name : catalog.i18nc("@label", "Hotend")
|
||||
color: UM.Theme.getColor("text")
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
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
|
||||
id: extruderRectangle
|
||||
color: UM.Theme.getColor("sidebar")
|
||||
width: extrudersGrid.width / 2 - UM.Theme.getSize("sidebar_lining_thin").width / 2
|
||||
height: UM.Theme.getSize("sidebar_extruder_box").height
|
||||
|
||||
Text //Extruder name.
|
||||
{
|
||||
text: machineExtruderCount.properties.value > 1 ? extrudersModel.getItem(index).name : catalog.i18nc("@label", "Hotend")
|
||||
color: UM.Theme.getColor("text")
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
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…
x
Reference in New Issue
Block a user