GODT-1389: Fix buttons and banner layout

This commit is contained in:
Alexander Bilyak
2021-10-28 14:03:23 +02:00
committed by Jakub
parent 5637ca2529
commit 07b7fa7364
2 changed files with 10 additions and 6 deletions

View File

@ -94,9 +94,12 @@ Popup {
RowLayout { RowLayout {
anchors.fill: parent anchors.fill: parent
anchors.margins: 12
spacing: 10 anchors.topMargin: 14
anchors.bottomMargin: 14
anchors.leftMargin: 16
spacing: 8
ColorImage { ColorImage {
color: root.colorScheme.text_invert color: root.colorScheme.text_invert
@ -130,14 +133,12 @@ Popup {
Label { Label {
colorScheme: root.colorScheme colorScheme: root.colorScheme
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.alignment: Qt.AlignVCenter
color: root.colorScheme.text_invert color: root.colorScheme.text_invert
text: root.notification ? root.notification.text : "" text: root.notification ? root.notification.text : ""
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
verticalAlignment: Text.AlignVCenter
} }
} }
} }

View File

@ -36,6 +36,9 @@ T.Button {
property int labelType: Proton.Label.LabelType.Body 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? // TODO: store previous enabled state and restore it?
// For now assuming that only enabled buttons could have loading state // For now assuming that only enabled buttons could have loading state
onLoadingChanged: { onLoadingChanged: {
@ -82,7 +85,7 @@ T.Button {
id: label id: label
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.alignment: Qt.AlignVCenter
elide: Text.ElideRight elide: Text.ElideRight
horizontalAlignment: Qt.AlignHCenter horizontalAlignment: Qt.AlignHCenter