From 3bdfc3e52817e2e3ce156ac549482405e76150b1 Mon Sep 17 00:00:00 2001 From: Noelia Date: Thu, 5 May 2022 16:03:54 +0200 Subject: [PATCH] fix(StatusBaseButton): After loading, button keeps loader width, so the button size is bigger When button changed from loading to their normal shape it kept the width of the loader as it was visible in the row component. It has been added a binding between loader `visible` property and root `loading` property that fixes the issue with the width. Also, removed some `break` leftovers. Fixes #5606 --> https://github.com/status-im/status-desktop/issues/5606 --- src/StatusQ/Controls/StatusBaseButton.qml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/StatusQ/Controls/StatusBaseButton.qml b/src/StatusQ/Controls/StatusBaseButton.qml index f7d9282a..c8b61bf1 100644 --- a/src/StatusQ/Controls/StatusBaseButton.qml +++ b/src/StatusQ/Controls/StatusBaseButton.qml @@ -40,11 +40,9 @@ Rectangle { return 5 case StatusBaseButton.Size.Small: return 10 - break; case StatusBaseButton.Size.Large: default: return 11 - break; } } property real defaultBottomPadding: { @@ -53,11 +51,9 @@ Rectangle { return 5 case StatusBaseButton.Size.Small: return 10 - break; case StatusBaseButton.Size.Large: default: return 11 - break; } } @@ -138,6 +134,7 @@ Rectangle { Loader { anchors.verticalCenter: parent.verticalCenter active: loading + visible: loading sourceComponent: StatusLoadingIndicator { color: statusBaseButton.enabled ? textColor : disabledTextColor