Fix hover, systray menu and theming
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user