Always center button text (for now)
This commit is contained in:
parent
aef777d853
commit
6ae37dc31f
2
TODO.md
2
TODO.md
|
@ -5,7 +5,6 @@
|
||||||
- Account delegate name color
|
- Account delegate name color
|
||||||
- If avatar is set, name color from average color?
|
- If avatar is set, name color from average color?
|
||||||
- normalSpacing in Theme
|
- normalSpacing in Theme
|
||||||
- Qt.AlignCenter instead of V | H
|
|
||||||
- banner button repair
|
- banner button repair
|
||||||
- Wrong avatar for group rooms
|
- Wrong avatar for group rooms
|
||||||
- Make sure to not cache user images and that sourceSize is set everywhere
|
- Make sure to not cache user images and that sourceSize is set everywhere
|
||||||
|
@ -13,7 +12,6 @@
|
||||||
downloading is implemented
|
downloading is implemented
|
||||||
- HTextField focus effect
|
- HTextField focus effect
|
||||||
- Button can get "hoverEnabled: false" to let HoverHandlers work
|
- Button can get "hoverEnabled: false" to let HoverHandlers work
|
||||||
- Center account box buttons
|
|
||||||
- Handle TimeoutError for all kind of async requests (nio)
|
- Handle TimeoutError for all kind of async requests (nio)
|
||||||
- Handle thumbnail response status 400
|
- Handle thumbnail response status 400
|
||||||
- "Loading..." if going to edit account page while it's loading
|
- "Loading..." if going to edit account page while it's loading
|
||||||
|
|
|
@ -15,7 +15,6 @@ HBaseButton {
|
||||||
property var iconTransform: null
|
property var iconTransform: null
|
||||||
|
|
||||||
property int fontSize: theme.fontSize.normal
|
property int fontSize: theme.fontSize.normal
|
||||||
property bool centerText: Boolean(iconName)
|
|
||||||
|
|
||||||
property bool loading: false
|
property bool loading: false
|
||||||
|
|
||||||
|
@ -49,8 +48,7 @@ HBaseButton {
|
||||||
HLabel {
|
HLabel {
|
||||||
text: button.text
|
text: button.text
|
||||||
font.pixelSize: fontSize
|
font.pixelSize: fontSize
|
||||||
horizontalAlignment: button.centerText ?
|
horizontalAlignment: Text.AlignHCenter
|
||||||
Text.AlignHCenter : Text.AlignLeft
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
color: enabled ?
|
color: enabled ?
|
||||||
theme.colors.foreground : theme.colors.foregroundDim2
|
theme.colors.foreground : theme.colors.foregroundDim2
|
||||||
|
@ -66,7 +64,7 @@ HBaseButton {
|
||||||
HIcon {
|
HIcon {
|
||||||
svgName: "hourglass"
|
svgName: "hourglass"
|
||||||
Layout.preferredWidth: contentWidth || -1
|
Layout.preferredWidth: contentWidth || -1
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,7 +134,6 @@ HGridLayout {
|
||||||
id: saveButton
|
id: saveButton
|
||||||
iconName: "save"
|
iconName: "save"
|
||||||
text: qsTr("Save")
|
text: qsTr("Save")
|
||||||
centerText: false
|
|
||||||
loading: nameChangeRunning || avatarChangeRunning
|
loading: nameChangeRunning || avatarChangeRunning
|
||||||
enabled: nameField.changed || avatar.changed
|
enabled: nameField.changed || avatar.changed
|
||||||
|
|
||||||
|
@ -147,7 +146,6 @@ HGridLayout {
|
||||||
HUIButton {
|
HUIButton {
|
||||||
iconName: "cancel"
|
iconName: "cancel"
|
||||||
text: qsTr("Cancel")
|
text: qsTr("Cancel")
|
||||||
centerText: false
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.alignment: Qt.AlignBottom
|
Layout.alignment: Qt.AlignBottom
|
||||||
|
|
Loading…
Reference in New Issue
Block a user