mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 04:19:19 -08:00
fix: clip notif
This commit is contained in:
parent
6698f9648c
commit
b15bb36dae
2 changed files with 49 additions and 43 deletions
|
|
@ -81,8 +81,9 @@ Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
spacing: 5
|
spacing: 10
|
||||||
Text {
|
Text {
|
||||||
|
font.bold: true
|
||||||
Layout.preferredHeight: 26
|
Layout.preferredHeight: 26
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
@ -123,58 +124,62 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ListView {
|
ClippingRectangle {
|
||||||
id: notificationList
|
color: "transparent"
|
||||||
model: Notifications.list
|
Layout.alignment: Qt.AlignBottom
|
||||||
spacing: 10
|
Layout.preferredWidth: parent.width
|
||||||
ScrollBar.vertical: ScrollBar {}
|
Layout.preferredHeight: parent.height - 24
|
||||||
Layout.alignment: Qt.AlignCenter
|
ListView {
|
||||||
Layout.preferredWidth: parent.width
|
anchors.fill: parent
|
||||||
Layout.preferredHeight: parent.height
|
id: notificationList
|
||||||
|
model: Notifications.list
|
||||||
|
spacing: 10
|
||||||
|
ScrollBar.vertical: ScrollBar {}
|
||||||
|
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
required property Notification modelData
|
required property Notification modelData
|
||||||
|
|
||||||
height: 100
|
height: 100
|
||||||
width: 400//notificationList.width
|
width: 400
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: indivNotif
|
id: indivNotif
|
||||||
color: Stylix.base02
|
color: Stylix.base02
|
||||||
radius: 5
|
radius: 5
|
||||||
anchors {
|
anchors {
|
||||||
fill: parent
|
fill: parent
|
||||||
leftMargin: 5
|
leftMargin: 5
|
||||||
rightMargin: 5
|
rightMargin: 5
|
||||||
}
|
|
||||||
RowLayout {
|
|
||||||
anchors {
|
|
||||||
fill: parent
|
|
||||||
}
|
|
||||||
NotificationImage {
|
|
||||||
image: modelData.image
|
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
RowLayout {
|
||||||
Layout.leftMargin: 5
|
anchors {
|
||||||
Layout.rightMargin: 5
|
fill: parent
|
||||||
Layout.fillWidth: true
|
|
||||||
NotificationHeader {
|
|
||||||
modelData_: modelData
|
|
||||||
}
|
}
|
||||||
Text {
|
NotificationImage {
|
||||||
font.pointSize: 10
|
image: modelData.image
|
||||||
wrapMode: Text.WordWrap
|
}
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.leftMargin: 5
|
||||||
|
Layout.rightMargin: 5
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: modelData.image != "" ? indivNotif.width - 80 : indivNotif.width
|
NotificationHeader {
|
||||||
Layout.maximumWidth: indivNotif.width
|
modelData_: modelData
|
||||||
elide: Text.ElideRight
|
}
|
||||||
text: modelData.body
|
Text {
|
||||||
color: Stylix.base05
|
font.pointSize: 10
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredWidth: modelData.image != "" ? indivNotif.width - 80 : indivNotif.width
|
||||||
|
Layout.maximumWidth: indivNotif.width
|
||||||
|
elide: Text.ElideRight
|
||||||
|
text: modelData.body
|
||||||
|
color: Stylix.base05
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
NotificationActions {
|
NotificationActions {
|
||||||
modelData_: modelData
|
modelData_: modelData
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ RowLayout {
|
||||||
source: Quickshell.iconPath(modelData_.appIcon)
|
source: Quickshell.iconPath(modelData_.appIcon)
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
|
font.bold: true
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
text: modelData_.summary
|
text: modelData_.summary
|
||||||
color: Stylix.base05
|
color: Stylix.base05
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue