Compare commits
4 commits
7cd6716eb8
...
2bb7f6b8e7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2bb7f6b8e7 | ||
|
|
47dbffad0f | ||
|
|
87aeed2ee5 | ||
|
|
d0be9616ae |
3 changed files with 25 additions and 20 deletions
|
|
@ -121,7 +121,7 @@ Item {
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.leftMargin: _icon.visible ? 8 : 14
|
anchors.leftMargin: _icon.visible ? 8 : 14
|
||||||
anchors.rightMargin: 12
|
anchors.rightMargin: 20
|
||||||
anchors.topMargin: 8
|
anchors.topMargin: 8
|
||||||
spacing: 2
|
spacing: 2
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ M.HoverPanel {
|
||||||
appIcon: g.appIcon,
|
appIcon: g.appIcon,
|
||||||
count: g.notifs.length,
|
count: g.notifs.length,
|
||||||
collapsed: collapsed,
|
collapsed: collapsed,
|
||||||
summaries: g.notifs.map(n => n.summary || "").filter(Boolean).join(" · ")
|
summaries: g.notifs.map(n => n.summary || "")
|
||||||
});
|
});
|
||||||
if (!collapsed) {
|
if (!collapsed) {
|
||||||
for (const n of g.notifs)
|
for (const n of g.notifs)
|
||||||
|
|
@ -241,7 +241,7 @@ M.HoverPanel {
|
||||||
|
|
||||||
readonly property real _targetHeight: {
|
readonly property real _targetHeight: {
|
||||||
if (_type === "header")
|
if (_type === "header")
|
||||||
return modelData.collapsed ? (28 + M.Theme.fontSize + 4) : 28;
|
return modelData.collapsed ? (28 + modelData.count * (M.Theme.fontSize + 4)) : 28;
|
||||||
return _notifCard.implicitHeight;
|
return _notifCard.implicitHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -339,6 +339,7 @@ M.HoverPanel {
|
||||||
color: M.Theme.base04
|
color: M.Theme.base04
|
||||||
font.pixelSize: M.Theme.fontSize - 2
|
font.pixelSize: M.Theme.fontSize - 2
|
||||||
font.family: M.Theme.fontFamily
|
font.family: M.Theme.fontFamily
|
||||||
|
opacity: _headerHover.hovered ? 1 : 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// App name
|
// App name
|
||||||
|
|
@ -385,24 +386,28 @@ M.HoverPanel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Collapsed preview: notification summaries on a subtitle row
|
// Collapsed preview: one line per notification summary
|
||||||
|
Repeater {
|
||||||
|
model: (notifDelegate._type === "header" && notifDelegate.modelData.collapsed) ? notifDelegate.modelData.summaries : []
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
visible: notifDelegate._type === "header" && notifDelegate.modelData.collapsed
|
required property string modelData
|
||||||
|
required property int index
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 10
|
anchors.leftMargin: 10
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 10
|
anchors.rightMargin: 10
|
||||||
anchors.top: parent.top
|
y: 28 + index * (M.Theme.fontSize + 4)
|
||||||
anchors.topMargin: 28
|
|
||||||
height: M.Theme.fontSize + 4
|
height: M.Theme.fontSize + 4
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
text: notifDelegate._type === "header" ? (notifDelegate.modelData.summaries ?? "") : ""
|
text: modelData
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
font.pixelSize: M.Theme.fontSize - 2
|
font.pixelSize: M.Theme.fontSize - 2
|
||||||
font.family: M.Theme.fontFamily
|
font.family: M.Theme.fontFamily
|
||||||
color: M.Theme.base04
|
color: M.Theme.base04
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ---- Individual notification ----
|
// ---- Individual notification ----
|
||||||
M.NotifCard {
|
M.NotifCard {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ PanelWindow {
|
||||||
|
|
||||||
required property var screen
|
required property var screen
|
||||||
|
|
||||||
visible: M.NotifService.popups.length > 0
|
visible: M.NotifService.popups.length > 0 && !M.NiriIpc.overviewOpen
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
WlrLayershell.layer: WlrLayer.Overlay
|
WlrLayershell.layer: WlrLayer.Overlay
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue