From 9dd65224bf55d04125d99d39cf21e561ee2527e2 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 --- ui/StatusQ/src/StatusQ/Controls/StatusBaseButton.qml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ui/StatusQ/src/StatusQ/Controls/StatusBaseButton.qml b/ui/StatusQ/src/StatusQ/Controls/StatusBaseButton.qml index f7d9282aa9..c8b61bf1df 100644 --- a/ui/StatusQ/src/StatusQ/Controls/StatusBaseButton.qml +++ b/ui/StatusQ/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