mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
fix(qml): center CButton text — wrap RowLayout in Item with anchors.centerIn
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -123,30 +123,34 @@ Button {
|
||||
}
|
||||
}
|
||||
|
||||
contentItem: RowLayout {
|
||||
id: contentRow
|
||||
spacing: 8
|
||||
contentItem: Item {
|
||||
implicitWidth: contentRow.implicitWidth
|
||||
implicitHeight: contentRow.implicitHeight
|
||||
|
||||
BusyIndicator {
|
||||
Layout.preferredWidth: 16
|
||||
Layout.preferredHeight: 16
|
||||
running: control.loading
|
||||
visible: control.loading
|
||||
}
|
||||
RowLayout {
|
||||
id: contentRow
|
||||
anchors.centerIn: parent
|
||||
spacing: 8
|
||||
|
||||
Text {
|
||||
visible: control._effectiveIcon !== "" && !control.loading
|
||||
text: control._effectiveIcon
|
||||
font.pixelSize: control.font.pixelSize
|
||||
color: control._foreground
|
||||
}
|
||||
BusyIndicator {
|
||||
Layout.preferredWidth: 16
|
||||
Layout.preferredHeight: 16
|
||||
running: control.loading
|
||||
visible: control.loading
|
||||
}
|
||||
|
||||
Text {
|
||||
text: control.text
|
||||
font: control.font
|
||||
color: control._foreground
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
Text {
|
||||
visible: control._effectiveIcon !== "" && !control.loading
|
||||
text: control._effectiveIcon
|
||||
font.pixelSize: control.font.pixelSize
|
||||
color: control._foreground
|
||||
}
|
||||
|
||||
Text {
|
||||
text: control.text
|
||||
font: control.font
|
||||
color: control._foreground
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user