mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 20:39:18 -08:00
feat: battery, refactor
This commit is contained in:
parent
9ae22c832f
commit
1ba98534eb
15 changed files with 122 additions and 6 deletions
|
|
@ -1,54 +0,0 @@
|
|||
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 {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
spacing: 10
|
||||
Text {
|
||||
font.bold: true
|
||||
Layout.preferredHeight: 26
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: "Notifications"
|
||||
color: Stylix.base05
|
||||
font.pixelSize: 16
|
||||
}
|
||||
Text {
|
||||
Layout.preferredHeight: 26
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
verticalAlignment: Text.AlignBottom
|
||||
id: clear
|
||||
text: ""
|
||||
color: Stylix.base08
|
||||
font.pixelSize: 16
|
||||
ToolTip {
|
||||
id: clearTooltip
|
||||
visible: false
|
||||
delay: 500
|
||||
timeout: 1000
|
||||
text: "Clear notifications"
|
||||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
if (Notifications.list.length >= 0) {
|
||||
Notifications.clear()
|
||||
root.updateDisplay()
|
||||
}
|
||||
}
|
||||
}
|
||||
HoverHandler {
|
||||
id: clearHover
|
||||
onHoveredChanged: {
|
||||
clearTooltip.visible = hovered
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue