From cdc1b9ba66c17301b57a2918fb09956d383b5392 Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Thu, 21 Sep 2017 14:28:22 +0200 Subject: [PATCH] CURA-4303 infill slider icon color, border, alignment --- resources/qml/SidebarSimple.qml | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 9bd5c7590a..f3202d0e63 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -509,21 +509,23 @@ Item } } - Item + Rectangle { id: infillIcon - width: (infillCellRight.width / 5) - (UM.Theme.getSize("sidebar_margin").width) + width: (parent.width / 5) - (UM.Theme.getSize("sidebar_margin").width) height: width - anchors.right: infillCellRight.right - anchors.top: infillSlider.top + anchors.right: parent.right + anchors.top: parent.top + anchors.topMargin: UM.Theme.getSize("sidebar_margin").height / 2 // we loop over all density icons and only show the one that has the current density and steps Repeater { id: infillIconList model: infillModel + anchors.fill: parent property int activeIndex: { for (var i = 0; i < infillModel.count; i++) { @@ -541,20 +543,21 @@ Item return -1 } - Item { + Rectangle + { anchors.fill: parent + visible: infillIconList.activeIndex == index - Rectangle { + border.width: UM.Theme.getSize("default_lining").width + border.color: UM.Theme.getColor("quality_slider_available") + + UM.RecolorImage { anchors.fill: parent - visible: infillIconList.activeIndex == index - - UM.RecolorImage { - anchors.fill: parent - sourceSize.width: width - sourceSize.height: width - source: UM.Theme.getIcon(model.icon) - color: UM.Theme.getColor("quality_slider_available") - } + anchors.margins: 2 + sourceSize.width: width + sourceSize.height: width + source: UM.Theme.getIcon(model.icon) + color: UM.Theme.getColor("quality_slider_unavailable") } } }