C6: progress bar from hints.value, maxHistory default -1 (unlimited)
This commit is contained in:
parent
3a9cd59243
commit
20cb306ad6
5 changed files with 50 additions and 8 deletions
|
|
@ -213,6 +213,28 @@ PanelWindow {
|
|||
visible: text !== ""
|
||||
}
|
||||
|
||||
// Progress bar (hints.value)
|
||||
Item {
|
||||
width: parent.width
|
||||
height: 4
|
||||
visible: (popupItem.modelData.hints?.value ?? -1) >= 0
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: M.Theme.base02
|
||||
radius: 2
|
||||
}
|
||||
Rectangle {
|
||||
width: parent.width * Math.min(1, Math.max(0, (popupItem.modelData.hints?.value ?? 0) / 100))
|
||||
height: parent.height
|
||||
radius: 2
|
||||
color: {
|
||||
const u = popupItem.modelData.urgency;
|
||||
return u === NotificationUrgency.Critical ? M.Theme.base08 : M.Theme.base0D;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Actions
|
||||
Row {
|
||||
spacing: 6
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue