Really fix icon-only buttons alignment

This commit is contained in:
miruka 2020-03-19 11:11:58 -04:00
parent 6ece4624ca
commit 03251f019e
3 changed files with 8 additions and 8 deletions

View File

@ -32,20 +32,22 @@ HRowLayout {
HIcon {
id: icon
svgName: button.icon.name
colorize: button.icon.color
// cache: button.icon.cache // TODO: need Qt 5.13+
anchors.centerIn: parent
width: svgName ? implicitWidth : 0
visible: width > 0
opacity: button.loading ? 0 : 1
colorize: button.icon.color
svgName: button.icon.name
// cache: button.icon.cache // TODO: need Qt 5.13+
Behavior on opacity { HNumberAnimation {} }
}
HBusyIndicator {
id: busyIndicator
anchors.centerIn: parent
width: height
height: parent.height
opacity: button.loading ? 1 : 0

View File

@ -163,8 +163,8 @@ HColumnLayout {
HButton {
icon.name: "upload-cancel"
icon.color: theme.colors.negativeBackground
padded: false
onClicked: transfer.cancel()
padded: false
Layout.preferredWidth: theme.baseElementsHeight
Layout.fillHeight: true

View File

@ -92,8 +92,6 @@ HColumnLayout {
},
)
// onEnabledChanged: if (openedPopup && ! enabled)
Layout.fillHeight: true
}
}