From e47514d6dd8ffa978b7547e41160d559a986fd13 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 25 Jul 2019 17:37:35 +0200 Subject: [PATCH] Fix horizontal bar not coloring correct if last item is checkbox CURA-6598 --- resources/qml/RadioCheckbar.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/qml/RadioCheckbar.qml b/resources/qml/RadioCheckbar.qml index 5210fed9e6..6a07d49b99 100644 --- a/resources/qml/RadioCheckbar.qml +++ b/resources/qml/RadioCheckbar.qml @@ -31,6 +31,7 @@ Item RowLayout { id: buttonBar + anchors.centerIn: parent height: childrenRect.height width: parent.width spacing: 0 @@ -46,7 +47,6 @@ Item // the horizontal bar. The others should essentially not be limited. Layout.maximumWidth: index + 1 === repeater.count ? activeComponent.width: 200000000 height: activeComponent.height - property bool isEnabled: model.enabled // The horizontal bar between the checkable options. // Note that the horizontal bar points towards the previous item. @@ -55,7 +55,7 @@ Item property Item previousItem: repeater.itemAt(index - 1) height: barSize - width: parent.width - activeComponent.width + width: buttonBar.width / (repeater.count - 1) - activeComponent.width - 2 color: defaultItemColor anchors @@ -63,7 +63,7 @@ Item right: activeComponent.left verticalCenter: activeComponent.verticalCenter } - visible: previousItem !== null && previousItem.isEnabled && isEnabled + visible: previousItem !== null && previousItem.isEnabled && isEnabled } Loader {