Really fix icon-only buttons alignment
This commit is contained in:
parent
6ece4624ca
commit
03251f019e
|
@ -32,20 +32,22 @@ HRowLayout {
|
||||||
|
|
||||||
HIcon {
|
HIcon {
|
||||||
id: icon
|
id: icon
|
||||||
svgName: button.icon.name
|
anchors.centerIn: parent
|
||||||
colorize: button.icon.color
|
|
||||||
// cache: button.icon.cache // TODO: need Qt 5.13+
|
|
||||||
|
|
||||||
width: svgName ? implicitWidth : 0
|
width: svgName ? implicitWidth : 0
|
||||||
visible: width > 0
|
visible: width > 0
|
||||||
|
|
||||||
opacity: button.loading ? 0 : 1
|
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 {} }
|
Behavior on opacity { HNumberAnimation {} }
|
||||||
}
|
}
|
||||||
|
|
||||||
HBusyIndicator {
|
HBusyIndicator {
|
||||||
id: busyIndicator
|
id: busyIndicator
|
||||||
|
anchors.centerIn: parent
|
||||||
width: height
|
width: height
|
||||||
height: parent.height
|
height: parent.height
|
||||||
opacity: button.loading ? 1 : 0
|
opacity: button.loading ? 1 : 0
|
||||||
|
|
|
@ -163,8 +163,8 @@ HColumnLayout {
|
||||||
HButton {
|
HButton {
|
||||||
icon.name: "upload-cancel"
|
icon.name: "upload-cancel"
|
||||||
icon.color: theme.colors.negativeBackground
|
icon.color: theme.colors.negativeBackground
|
||||||
padded: false
|
|
||||||
onClicked: transfer.cancel()
|
onClicked: transfer.cancel()
|
||||||
|
padded: false
|
||||||
|
|
||||||
Layout.preferredWidth: theme.baseElementsHeight
|
Layout.preferredWidth: theme.baseElementsHeight
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
|
@ -92,8 +92,6 @@ HColumnLayout {
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
// onEnabledChanged: if (openedPopup && ! enabled)
|
|
||||||
|
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user