Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-3_3] Do not collapse width of the expand/collapse button when layer has no children to help visual glance at legend #5457

Merged
merged 1 commit into from
Jul 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/qml/Legend.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -109,6 +106,7 @@ ListView {
iconColor: isSelectedLayer ? "white" : Theme.mainTextColor
bgcolor: "transparent"
visible: HasChildren
enabled: HasChildren
rotation: !IsCollapsed ? 90 : 0

Behavior on rotation {
Expand Down
Loading