mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 20:39:18 -08:00
fix: notifications
This commit is contained in:
parent
04732abbc8
commit
fb4da4296e
4 changed files with 177 additions and 136 deletions
59
quickshell/Components/NotificationActions.qml
Normal file
59
quickshell/Components/NotificationActions.qml
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Io
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import "root:/DataSources"
|
||||
import "root:/Helpers"
|
||||
import Quickshell.Services.Notifications
|
||||
|
||||
|
||||
RowLayout {
|
||||
required property Notification modelData_
|
||||
|
||||
Layout.minimumHeight: 0
|
||||
Layout.preferredHeight: modelData_.actions != [] ? 30 : 0
|
||||
visible: modelData_.actions != []
|
||||
spacing: 5
|
||||
Repeater {
|
||||
model: modelData_.actions
|
||||
|
||||
Item {
|
||||
required property NotificationAction actionData
|
||||
|
||||
width: 100
|
||||
height: 30
|
||||
|
||||
anchors {
|
||||
left: parent.left
|
||||
leftMargin: 5
|
||||
top: parent.top
|
||||
topMargin: 5
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: Stylix.base02
|
||||
radius: 5
|
||||
|
||||
Text {
|
||||
text: actionData.text
|
||||
color: Stylix.base05
|
||||
font.pixelSize: 12
|
||||
|
||||
anchors {
|
||||
left: parent.left
|
||||
leftMargin: 10
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: actionData.invoke()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue