noctalia-shell/Modules/Bar/Clock.qml
2025-08-10 00:09:45 -04:00

32 lines
470 B
QML

import QtQuick
import qs.Services
import qs.Widgets
// Clock Icon with attached calendar
NClock {
id: root
NTooltip {
id: tooltip
text: Time.dateString
target: root
}
NCalendar {
id: calendar
visible: false
}
onEntered: function (){
if (!calendar.visible) {
tooltip.show()
}
}
onExited: function (){
tooltip.hide()
}
onClicked: function () {
calendar.visible = !calendar.visible
tooltip.hide()
}
}