diff --git a/src/qml/Base/HButton.qml b/src/qml/Base/HButton.qml index 4566c0ea..05e8fcc9 100644 --- a/src/qml/Base/HButton.qml +++ b/src/qml/Base/HButton.qml @@ -4,12 +4,12 @@ import QtQuick.Layouts 1.12 Button { id: button - spacing: theme.spacing - topPadding: spacing / (circle ? 1.75 : 1.5) - bottomPadding: topPadding - leftPadding: spacing / (circle ? 1.5 : 1) - rightPadding: leftPadding enabled: ! button.loading + spacing: theme.spacing + topPadding: padded ? spacing / (circle ? 1.75 : 1.5) : 0 + bottomPadding: topPadding + leftPadding: padded ? spacing / (circle ? 1.5 : 1) : 0 + rightPadding: leftPadding iconItem.svgName: loading ? "hourglass" : icon.name icon.color: theme.icons.colorize @@ -35,6 +35,7 @@ Button { property bool disableWhileLoading: true property bool loading: false property bool circle: false + property bool padded: true property HToolTip toolTip: HToolTip { id: toolTip diff --git a/src/qml/Base/HButtonContent.qml b/src/qml/Base/HButtonContent.qml index 2ffb75af..76f9bdf9 100644 --- a/src/qml/Base/HButtonContent.qml +++ b/src/qml/Base/HButtonContent.qml @@ -21,6 +21,7 @@ HRowLayout { Item { id: iconWrapper + Layout.alignment: Qt.AlignCenter Layout.preferredWidth: icon.width Layout.preferredHeight: icon.height @@ -92,6 +93,7 @@ HRowLayout { verticalAlignment: Text.AlignVCenter elide: Text.ElideRight + Layout.alignment: Qt.AlignCenter Layout.fillWidth: true Layout.fillHeight: true }