Skip to content

Commit 39e8fc8

Browse files
authored
VPN-7408 - Remove ProgressBarDelegate from the render geometry when 0 sized (#10936)
1 parent b715d1a commit 39e8fc8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

nebula/ui/components/MZStepProgressBarDelegate.qml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,15 @@ Column {
5656

5757
anchors.centerIn: parent
5858

59+
readonly property bool shouldExpand: button.activeFocus || button.state === MZTheme.theme.uiState.stateHovered || button.state === MZTheme.theme.uiState.statePressed || delegate.currentState === MZStepProgressBarDelegate.State.Active
60+
5961
z: parent.z - 1
6062
radius: implicitWidth / 2
6163
color: MZTheme.colors.stepProgressBarHighlight
64+
visible: implicitWidth > 0 && implicitHeight > 0
6265

63-
implicitHeight: button.activeFocus || button.state === MZTheme.theme.uiState.stateHovered || button.state === MZTheme.theme.uiState.statePressed || delegate.currentState === MZStepProgressBarDelegate.State.Active ? parent.implicitHeight + 8 : 0
64-
implicitWidth: button.activeFocus || button.state === MZTheme.theme.uiState.stateHovered || button.state === MZTheme.theme.uiState.statePressed || delegate.currentState === MZStepProgressBarDelegate.State.Active ? parent.implicitWidth + 8 : 0
66+
implicitHeight: shouldExpand ? parent.implicitHeight + 8 : 0
67+
implicitWidth: shouldExpand ? parent.implicitWidth + 8 : 0
6568

6669
Behavior on implicitHeight {
6770
enabled: button.state !== MZTheme.theme.uiState.stateHovered && button.state !== MZTheme.theme.uiState.statePressed

0 commit comments

Comments
 (0)