From a99b193610338cc529120eb298d0a645bccf0ae2 Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Sat, 20 Jul 2024 18:37:53 +0700 Subject: [PATCH] Do not collapse width of the expand/collapse button when layer has no children to help visual glance at legend --- src/qml/Legend.qml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qml/Legend.qml b/src/qml/Legend.qml index d50ce193f2..83a20fc499 100644 --- a/src/qml/Legend.qml +++ b/src/qml/Legend.qml @@ -89,17 +89,14 @@ ListView { // Collapsed state visual feedback Row { id: collapsedState - property bool isVisible: HasChildren anchors.verticalCenter: parent.verticalCenter height: 24 - visible: isVisible Item { height: 24 - width: HasChildren ? 24 : 0 + width: 24 clip: true anchors.verticalCenter: parent.verticalCenter - visible: HasChildren QfToolButton { height: 35 @@ -109,6 +106,7 @@ ListView { iconColor: isSelectedLayer ? "white" : Theme.mainTextColor bgcolor: "transparent" visible: HasChildren + enabled: HasChildren rotation: !IsCollapsed ? 90 : 0 Behavior on rotation {