Skip to content

Commit 6d03ea2

Browse files
committed
UI Controls: remove anchors from SecondaryListLabel
Prefer to set anchor values when the component is used, instead of setting them within the reusable component.
1 parent daaa64d commit 6d03ea2

File tree

4 files changed

+3
-2
lines changed

4 files changed

+3
-2
lines changed

components/listitems/core/ListRadioButton.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ListItem {
1717

1818
content.children: [
1919
SecondaryListLabel {
20+
anchors.verticalCenter: parent.verticalCenter
2021
text: root.secondaryText
2122
width: Math.min(implicitWidth, root.maximumContentWidth - radioButton.width - Theme.geometry_listItem_content_spacing)
2223
visible: text.length > 0

components/listitems/core/ListText.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ ListItem {
1616
content.children: [
1717
SecondaryListLabel {
1818
id: secondaryLabel
19+
anchors.verticalCenter: parent.verticalCenter
1920
text: dataItem.valid ? dataItem.value : ""
2021
width: Math.min(implicitWidth, root.maximumContentWidth)
2122
visible: text.length > 0

components/listitems/core/ListTextField.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ ListItem {
216216
SecondaryListLabel {
217217
id: readonlyLabel
218218

219+
anchors.verticalCenter: parent.verticalCenter
219220
text: textField.text.length > 0 ? textField.text : "--"
220221
width: Math.min(implicitWidth, root.maximumContentWidth)
221222
visible: !textField.visible && textField.echoMode !== TextInput.Password

components/listitems/core/SecondaryListLabel.qml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,4 @@ Label {
1212
wrapMode: Text.Wrap
1313
horizontalAlignment: Text.AlignRight
1414
verticalAlignment: Text.AlignVCenter
15-
anchors.verticalCenter: parent.verticalCenter
16-
1715
}

0 commit comments

Comments
 (0)