Skip to content

Commit bb51832

Browse files
committed
Properly centered ToolBar labels
1 parent 1842e5e commit bb51832

2 files changed

Lines changed: 26 additions & 24 deletions

File tree

qml/Feed.qml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,18 @@ ColumnLayout {
117117

118118
z: 1
119119

120+
Label {
121+
text: "Feed"
122+
123+
font.pixelSize: 18
124+
font.bold: true
125+
126+
anchors.fill: parent
127+
128+
verticalAlignment: Qt.AlignVCenter
129+
horizontalAlignment: Qt.AlignHCenter
130+
}
131+
120132
RowLayout {
121133
anchors.fill: parent
122134

@@ -130,17 +142,7 @@ ColumnLayout {
130142
onClicked: newPostPopup.open()
131143
}
132144

133-
Label {
134-
text: "Feed"
135-
136-
font.pixelSize: 18
137-
font.bold: true
138-
139-
Layout.fillWidth: true
140-
141-
verticalAlignment: Qt.AlignVCenter
142-
horizontalAlignment: Qt.AlignHCenter
143-
}
145+
Item { Layout.fillWidth: true }
144146

145147
Avatar {
146148
avatarUrl: root.currentUser.avatar_url

qml/Profile.qml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,19 @@ ColumnLayout {
102102

103103
z: 2
104104

105+
Label {
106+
text: root.userProfile.display_name || "User Profile"
107+
108+
font.pixelSize: 18
109+
font.bold: true
110+
font.contextFontMerging: true
111+
112+
anchors.fill: parent
113+
114+
horizontalAlignment: Text.AlignHCenter
115+
verticalAlignment: Text.AlignVCenter
116+
}
117+
105118
RowLayout {
106119
anchors.fill: parent
107120
anchors.leftMargin: 5
@@ -117,19 +130,6 @@ ColumnLayout {
117130

118131
onClicked: Navigation.pop()
119132
}
120-
121-
Label {
122-
text: root.userProfile.display_name || "User Profile"
123-
124-
font.pixelSize: 18
125-
font.bold: true
126-
font.contextFontMerging: true
127-
128-
Layout.fillWidth: true
129-
130-
horizontalAlignment: Text.AlignHCenter
131-
verticalAlignment: Text.AlignVCenter
132-
}
133133
}
134134
}
135135

0 commit comments

Comments
 (0)