From 5f6b7450a9f8a2cfebe03d939cbc66a982bee680 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 7 Feb 2020 14:34:30 -0800 Subject: mobile/summary: correctly align text to vertical center I keep forgetting that the verticalAlignment is only within the current object, which means that in a single line label it has no meaning at all. Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/DiveSummary.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mobile-widgets/qml') diff --git a/mobile-widgets/qml/DiveSummary.qml b/mobile-widgets/qml/DiveSummary.qml index 7eb8d254a..21a5f3305 100644 --- a/mobile-widgets/qml/DiveSummary.qml +++ b/mobile-widgets/qml/DiveSummary.qml @@ -123,7 +123,7 @@ Kirigami.ScrollablePage { height: headerLabel.height + Kirigami.Units.largeSpacing TemplateLabel { id: headerLabel - verticalAlignment: Qt.AlignVCenter + anchors.verticalCenter: parent.verticalCenter colorBackground: parent.color leftPadding: Kirigami.Units.largeSpacing text: header !== undefined ? header : "" @@ -135,7 +135,7 @@ Kirigami.ScrollablePage { width: headerColumnWidth * 1.5 - Kirigami.Units.gridUnit height: headerLabel.height + Kirigami.Units.largeSpacing TemplateLabel { - verticalAlignment: Qt.AlignVCenter + anchors.verticalCenter: parent.verticalCenter colorBackground: parent.color text: col0 !== undefined ? col0 : "" } @@ -145,7 +145,7 @@ Kirigami.ScrollablePage { width: headerColumnWidth * 1.5 - Kirigami.Units.gridUnit height: headerLabel.height + Kirigami.Units.largeSpacing TemplateLabel { - verticalAlignment: Qt.AlignVCenter + anchors.verticalCenter: parent.verticalCenter colorBackground: parent.color text: col1 !== undefined ? col1 : "" } @@ -160,7 +160,7 @@ Kirigami.ScrollablePage { height: headerLabel.height + Kirigami.Units.largeSpacing TemplateLabel { id: headerLabel - verticalAlignment: Qt.AlignVCenter + anchors.verticalCenter: parent.verticalCenter colorBackground: parent.color text: section font.bold: true -- cgit v1.2.3-70-g09d2