From 58e73219416af943a3a2d0849f4417b8fcef09e6 Mon Sep 17 00:00:00 2001 From: miruka Date: Sat, 11 Jul 2020 17:55:05 -0400 Subject: [PATCH] Fix HButton height for icon-only buttons The button only considered its label previously to calculate its implicit height. --- src/gui/Base/HButton.qml | 3 +-- src/gui/Base/HButtonContent.qml | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/Base/HButton.qml b/src/gui/Base/HButton.qml index 69706125..11d89fc0 100644 --- a/src/gui/Base/HButton.qml +++ b/src/gui/Base/HButton.qml @@ -8,8 +8,7 @@ Button { id: button enabled: ! button.loading spacing: theme.spacing - topPadding: - padded ? spacing * (circle ? (iconItem.small ? 1.5 : 1.8) : 0.5) : 0 + topPadding: padded ? spacing * (circle ? 1 : 0.5) : 0 bottomPadding: topPadding leftPadding: padded ? spacing : 0 rightPadding: leftPadding diff --git a/src/gui/Base/HButtonContent.qml b/src/gui/Base/HButtonContent.qml index 246be8f4..363f71f5 100644 --- a/src/gui/Base/HButtonContent.qml +++ b/src/gui/Base/HButtonContent.qml @@ -26,6 +26,8 @@ HRowLayout { Layout.preferredWidth: button.loading ? busyIndicatorLoader.width : icon.width + Layout.preferredHeight: + button.loading ? busyIndicatorLoader.height : icon.height Layout.fillHeight: true Layout.alignment: Qt.AlignCenter