From 03251f019ee04ea1b83aa080c3317a51128cad20 Mon Sep 17 00:00:00 2001 From: miruka Date: Thu, 19 Mar 2020 11:11:58 -0400 Subject: [PATCH] Really fix icon-only buttons alignment --- src/gui/Base/HButtonContent.qml | 12 +++++++----- src/gui/Pages/Chat/FileTransfer/Transfer.qml | 2 +- src/gui/Pages/Chat/RoomPane/MemberView.qml | 2 -- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gui/Base/HButtonContent.qml b/src/gui/Base/HButtonContent.qml index 83e28170..40f37f7b 100644 --- a/src/gui/Base/HButtonContent.qml +++ b/src/gui/Base/HButtonContent.qml @@ -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 diff --git a/src/gui/Pages/Chat/FileTransfer/Transfer.qml b/src/gui/Pages/Chat/FileTransfer/Transfer.qml index 39d17b75..929a2ab6 100644 --- a/src/gui/Pages/Chat/FileTransfer/Transfer.qml +++ b/src/gui/Pages/Chat/FileTransfer/Transfer.qml @@ -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 diff --git a/src/gui/Pages/Chat/RoomPane/MemberView.qml b/src/gui/Pages/Chat/RoomPane/MemberView.qml index 17dac36d..3f8e5ded 100644 --- a/src/gui/Pages/Chat/RoomPane/MemberView.qml +++ b/src/gui/Pages/Chat/RoomPane/MemberView.qml @@ -92,8 +92,6 @@ HColumnLayout { }, ) - // onEnabledChanged: if (openedPopup && ! enabled) - Layout.fillHeight: true } }