Fix hover, systray menu and theming

This commit is contained in:
Amaro Lopes
2025-09-24 17:02:46 -03:00
parent 161988cbb6
commit c66d043ece
8 changed files with 116 additions and 53 deletions

View File

@@ -1,5 +1,6 @@
import QtQuick
import Quickshell.Widgets
import Quickshell.Io
import qs.Services
import qs.Common
@@ -12,22 +13,48 @@ Item {
}
Rectangle {
id: clock
color: Theme.backgroudColor
implicitWidth: clockText.implicitWidth * 1.6
implicitHeight: Theme.heightGaps //root.implicitHeight*0.8
implicitHeight: Theme.heightGaps
radius: 25
property string calendar: ""
Text {
id: clockText
anchors.centerIn: parent
text: Time.time
font.bold: true
font.pixelSize: 14
font.pixelSize: Theme.pixelSize
font.family: Theme.fontFamily
color: Theme.textColor
}
Process {
id: cal
running: true
command: ["cal","-S3"]
stdout: StdioCollector {
onStreamFinished: {clock.calendar=this.text}
}
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
onEntered: {
cal.running = true
PopUpHover.start(clock,"time")
}
onExited: {
PopUpHover.exit()
}
}
}
}