From 6ae37dc31fc5262f6a5b0e0f0bdd2ef61841f925 Mon Sep 17 00:00:00 2001 From: miruka Date: Tue, 16 Jul 2019 04:41:26 -0400 Subject: [PATCH] Always center button text (for now) --- TODO.md | 2 -- src/qml/Base/HUIButton.qml | 6 ++---- src/qml/Pages/EditAccount/Profile.qml | 2 -- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/TODO.md b/TODO.md index f7e3be4b..709a781f 100644 --- a/TODO.md +++ b/TODO.md @@ -5,7 +5,6 @@ - Account delegate name color - If avatar is set, name color from average color? - normalSpacing in Theme -- Qt.AlignCenter instead of V | H - banner button repair - Wrong avatar for group rooms - Make sure to not cache user images and that sourceSize is set everywhere @@ -13,7 +12,6 @@ downloading is implemented - HTextField focus effect - Button can get "hoverEnabled: false" to let HoverHandlers work -- Center account box buttons - Handle TimeoutError for all kind of async requests (nio) - Handle thumbnail response status 400 - "Loading..." if going to edit account page while it's loading diff --git a/src/qml/Base/HUIButton.qml b/src/qml/Base/HUIButton.qml index 91e3a501..e38402b7 100644 --- a/src/qml/Base/HUIButton.qml +++ b/src/qml/Base/HUIButton.qml @@ -15,7 +15,6 @@ HBaseButton { property var iconTransform: null property int fontSize: theme.fontSize.normal - property bool centerText: Boolean(iconName) property bool loading: false @@ -49,8 +48,7 @@ HBaseButton { HLabel { text: button.text font.pixelSize: fontSize - horizontalAlignment: button.centerText ? - Text.AlignHCenter : Text.AlignLeft + horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter color: enabled ? theme.colors.foreground : theme.colors.foregroundDim2 @@ -66,7 +64,7 @@ HBaseButton { HIcon { svgName: "hourglass" Layout.preferredWidth: contentWidth || -1 - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter + Layout.alignment: Qt.AlignCenter } } } diff --git a/src/qml/Pages/EditAccount/Profile.qml b/src/qml/Pages/EditAccount/Profile.qml index 7593545b..7ea0f28c 100644 --- a/src/qml/Pages/EditAccount/Profile.qml +++ b/src/qml/Pages/EditAccount/Profile.qml @@ -134,7 +134,6 @@ HGridLayout { id: saveButton iconName: "save" text: qsTr("Save") - centerText: false loading: nameChangeRunning || avatarChangeRunning enabled: nameField.changed || avatar.changed @@ -147,7 +146,6 @@ HGridLayout { HUIButton { iconName: "cancel" text: qsTr("Cancel") - centerText: false Layout.fillWidth: true Layout.alignment: Qt.AlignBottom