Remove notification progress indicator
This commit is contained in:
@@ -820,9 +820,9 @@ Item {
|
|||||||
Repeater {
|
Repeater {
|
||||||
model: popupModel
|
model: popupModel
|
||||||
|
|
||||||
// The delegate is a slot Item that owns lifetime state (timer,
|
// The delegate is a slot Item that owns lifetime timer state. The
|
||||||
// progress, paused). The actual visuals live in NotificationCard,
|
// actual visuals live in NotificationCard, which the history panel
|
||||||
// which the history panel also reuses.
|
// also reuses.
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
id: cardSlot
|
id: cardSlot
|
||||||
required property int index
|
required property int index
|
||||||
@@ -872,8 +872,6 @@ Item {
|
|||||||
cornerRadius: service.cornerRadius
|
cornerRadius: service.cornerRadius
|
||||||
fontFamily: service.shell && service.shell.bar ? service.shell.bar.fontFamily : ""
|
fontFamily: service.shell && service.shell.bar ? service.shell.bar.fontFamily : ""
|
||||||
glyph: cardSlot.glyph
|
glyph: cardSlot.glyph
|
||||||
progress: cardSlot.progress
|
|
||||||
showProgress: cardSlot.lifetime > 0
|
|
||||||
|
|
||||||
onCloseRequested: service.dismissPopup(cardSlot.index)
|
onCloseRequested: service.dismissPopup(cardSlot.index)
|
||||||
onCardClicked: service.invokePopupDefault(cardSlot.index)
|
onCardClicked: service.invokePopupDefault(cardSlot.index)
|
||||||
|
|||||||
@@ -24,9 +24,6 @@ Rectangle {
|
|||||||
property double timestamp: 0
|
property double timestamp: 0
|
||||||
property int cornerRadius: 0
|
property int cornerRadius: 0
|
||||||
|
|
||||||
property real progress: 1.0
|
|
||||||
property bool showProgress: false
|
|
||||||
|
|
||||||
// System monospace font injected by the container.
|
// System monospace font injected by the container.
|
||||||
property string fontFamily: ""
|
property string fontFamily: ""
|
||||||
|
|
||||||
@@ -69,8 +66,7 @@ Rectangle {
|
|||||||
|
|
||||||
implicitWidth: Style.space(380)
|
implicitWidth: Style.space(380)
|
||||||
// Add 2 * border.width so mainColumn (inset by border.width on top/left/right)
|
// Add 2 * border.width so mainColumn (inset by border.width on top/left/right)
|
||||||
// doesn't push content under the bottom edge. The bottom edge is also inset
|
// doesn't push content under the bottom edge.
|
||||||
// for symmetry except when the progress bar replaces it.
|
|
||||||
implicitHeight: mainColumn.implicitHeight + border.width * 2
|
implicitHeight: mainColumn.implicitHeight + border.width * 2
|
||||||
radius: cornerRadius
|
radius: cornerRadius
|
||||||
color: Color.notifications.background
|
color: Color.notifications.background
|
||||||
@@ -176,23 +172,4 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Progress bar at the bottom edge. Stays visible while the container has
|
|
||||||
// a finite lifetime; freezes (doesn't decrement) when hover pauses the
|
|
||||||
// tick from the container side.
|
|
||||||
Rectangle {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
height: Math.max(1, Style.space(3))
|
|
||||||
color: Color.notifications.border
|
|
||||||
visible: root.showProgress
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
width: parent.width * Math.max(0, Math.min(1, root.progress))
|
|
||||||
color: root.accentColor
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user