Add notification when battery is low, fix some warnings
This commit is contained in:
parent
d2b202c25f
commit
c6683712a4
5 changed files with 52 additions and 51 deletions
|
|
@ -203,38 +203,7 @@ Variants {
|
|||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
// Notification actions
|
||||
RowLayout {
|
||||
visible: model.actions && model.actions.length > 0
|
||||
spacing: Style.marginXS * scaling
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Style.marginS * scaling
|
||||
|
||||
Repeater {
|
||||
model: model.actions || []
|
||||
delegate: NPill {
|
||||
text: modelData.text || modelData.identifier || "Action"
|
||||
icon: modelData.identifier || ""
|
||||
tooltipText: modelData.text || modelData.identifier || "Action"
|
||||
sizeMultiplier: 0.7
|
||||
Layout.fillWidth: true
|
||||
forceOpen: true
|
||||
|
||||
// Style action buttons differently
|
||||
pillColor: Color.mPrimary
|
||||
textColor: Color.mOnPrimary
|
||||
iconCircleColor: Color.mPrimary
|
||||
iconTextColor: Color.mOnPrimary
|
||||
|
||||
onClicked: {
|
||||
// Invoke the notification action
|
||||
modelData.invoke()
|
||||
// Animate out the notification after action
|
||||
animateOut()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Actions removed
|
||||
}
|
||||
|
||||
NIconButton {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue