Skip to content

Commit

Permalink
Do not collapse width of the expand/collapse button when layer has no…
Browse files Browse the repository at this point in the history
… children to help visual glance at legend
  • Loading branch information
nirvn committed Jul 20, 2024
1 parent 7850ffa commit d4b7258
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/qml/Legend.qml
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,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
Expand All @@ -105,6 +102,7 @@ ListView {
iconColor: isSelectedLayer ? "white" : Theme.mainTextColor
bgcolor: "transparent"
visible: HasChildren
enabled: HasChildren
rotation: !IsCollapsed ? 90 : 0

Behavior on rotation {
Expand Down

0 comments on commit d4b7258

Please sign in to comment.