From 07b7fa7364e8e43ff0c65aba118c8cc58a8949ff Mon Sep 17 00:00:00 2001 From: Alexander Bilyak Date: Thu, 28 Oct 2021 14:03:23 +0200 Subject: [PATCH] GODT-1389: Fix buttons and banner layout --- internal/frontend/qml/Banner.qml | 11 ++++++----- internal/frontend/qml/Proton/Button.qml | 5 ++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/internal/frontend/qml/Banner.qml b/internal/frontend/qml/Banner.qml index ae51762a..00e9703f 100644 --- a/internal/frontend/qml/Banner.qml +++ b/internal/frontend/qml/Banner.qml @@ -94,9 +94,12 @@ Popup { RowLayout { anchors.fill: parent - anchors.margins: 12 - spacing: 10 + anchors.topMargin: 14 + anchors.bottomMargin: 14 + anchors.leftMargin: 16 + + spacing: 8 ColorImage { color: root.colorScheme.text_invert @@ -130,14 +133,12 @@ Popup { Label { colorScheme: root.colorScheme Layout.fillWidth: true - Layout.fillHeight: true + Layout.alignment: Qt.AlignVCenter color: root.colorScheme.text_invert text: root.notification ? root.notification.text : "" wrapMode: Text.WordWrap - - verticalAlignment: Text.AlignVCenter } } } diff --git a/internal/frontend/qml/Proton/Button.qml b/internal/frontend/qml/Proton/Button.qml index 35ed0f1c..67336f35 100644 --- a/internal/frontend/qml/Proton/Button.qml +++ b/internal/frontend/qml/Proton/Button.qml @@ -36,6 +36,9 @@ T.Button { property int labelType: Proton.Label.LabelType.Body + property alias textVerticalAlignment: label.verticalAlignment + property alias textHorizontalAlignment: label.horizontalAlignment + // TODO: store previous enabled state and restore it? // For now assuming that only enabled buttons could have loading state onLoadingChanged: { @@ -82,7 +85,7 @@ T.Button { id: label Layout.fillWidth: true - Layout.fillHeight: true + Layout.alignment: Qt.AlignVCenter elide: Text.ElideRight horizontalAlignment: Qt.AlignHCenter