Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion panels/notification/plugin/NotifyItemContent.qml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ NotifyItem {
Control {
id: impl
anchors.fill: parent
implicitHeight: contentColumn.implicitHeight

Item {
anchors.fill: parent
Expand Down Expand Up @@ -125,6 +126,7 @@ NotifyItem {
}

contentItem: RowLayout {
id: contentRow
spacing: 0
Binding {
target: root
Expand All @@ -143,16 +145,28 @@ NotifyItem {
}

ColumnLayout {
id: contentColumn
spacing: 0
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
Layout.rightMargin: 10
Layout.leftMargin: 10
Layout.topMargin: NotifyStyle.contentItem.topMargin
Layout.bottomMargin: NotifyStyle.contentItem.bottomMargin
Layout.fillWidth: true
Layout.fillHeight: true
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Removing Layout.fillHeight may affect vertical stretching of contentColumn.

Please verify that removing Layout.fillHeight does not cause layout issues, especially in scenarios where contentColumn should stretch vertically.

Layout.minimumHeight: NotifyStyle.contentItem.miniHeight
Layout.maximumHeight: 240
implicitHeight: {
var height = 0
height += firstLine.Layout.preferredHeight
if (root.title !== "") {
height += title.implicitHeight
}
var bodyHeight = bodyText.implicitHeight
if (bodyText.visible && bodyHeight > 0) {
height += bodyHeight
}
return height
}
RowLayout {
id: firstLine
spacing: 0
Expand Down Expand Up @@ -184,6 +198,7 @@ NotifyItem {
}

Text {
id: title
text: root.title
visible: text !== ""
maximumLineCount: 1
Expand All @@ -200,6 +215,7 @@ NotifyItem {
}

RowLayout {
id: bodyRow
Layout.fillWidth: true
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
Text {
Expand Down