NToast: Column => ColumnLayout

This commit is contained in:
LemmyCook 2025-09-05 17:06:09 -04:00
parent c8a056f332
commit 8fedd7612d

View file

@ -90,7 +90,6 @@ Item {
// Main toast container // Main toast container
Rectangle { Rectangle {
id: container
anchors.fill: parent anchors.fill: parent
radius: Style.radiusL * scaling radius: Style.radiusL * scaling
@ -146,37 +145,33 @@ Item {
} }
// Label and description // Label and description
Column { ColumnLayout {
id: textColumn
spacing: Style.marginXXS * scaling spacing: Style.marginXXS * scaling
Layout.fillWidth: true Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
NText { NText {
id: labelText Layout.fillWidth: true
text: root.label text: root.label
color: Color.mOnSurface color: Color.mOnSurface
font.pointSize: Style.fontSizeM * scaling font.pointSize: Style.fontSizeM * scaling
font.weight: Style.fontWeightBold font.weight: Style.fontWeightBold
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
width: parent.width
visible: text.length > 0 visible: text.length > 0
} }
NText { NText {
id: descriptionText Layout.fillWidth: true
text: root.description text: root.description
color: Color.mOnSurface color: Color.mOnSurface
font.pointSize: Style.fontSizeM * scaling font.pointSize: Style.fontSizeM * scaling
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
width: parent.width
visible: text.length > 0 visible: text.length > 0
} }
} }
// Close button (only if persistent or manual dismiss needed) // Close button (only if persistent or manual dismiss needed)
NIconButton { NIconButton {
id: closeButton
icon: "close" icon: "close"
visible: root.persistent || root.duration === 0 visible: root.persistent || root.duration === 0