mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
NClock
This commit is contained in:
+1
-1
@@ -73,7 +73,7 @@ PanelWindow {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
}
|
||||
|
||||
Clock {}
|
||||
NClock {}
|
||||
|
||||
NIconButton {
|
||||
id: demoPanelToggler
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
import QtQuick
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
readonly property real scaling: Scaling.scale(screen)
|
||||
|
||||
width: textItem.paintedWidth
|
||||
height: textItem.paintedHeight
|
||||
color: "transparent"
|
||||
|
||||
NText {
|
||||
id: textItem
|
||||
text: Time.time
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: clockMouseArea
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
hoverEnabled: true
|
||||
onEntered: {
|
||||
if (!calendar.visible) {
|
||||
tooltip.show()
|
||||
}
|
||||
}
|
||||
onExited: {
|
||||
tooltip.hide()
|
||||
}
|
||||
onClicked: function () {
|
||||
calendar.visible = !calendar.visible
|
||||
tooltip.hide()
|
||||
}
|
||||
}
|
||||
|
||||
NCalendar {
|
||||
id: calendar
|
||||
visible: false
|
||||
}
|
||||
|
||||
NTooltip {
|
||||
id: tooltip
|
||||
text: Time.dateString
|
||||
target: root
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user