organize files
This commit is contained in:
28
quickshell/ui/Clock.qml
Normal file
28
quickshell/ui/Clock.qml
Normal file
@@ -0,0 +1,28 @@
|
||||
import QtQuick
|
||||
import "../constants"
|
||||
|
||||
// Clock
|
||||
|
||||
Text {
|
||||
id: clock
|
||||
color: Constants.colBlue
|
||||
|
||||
font {
|
||||
family: Constants.fontFamily
|
||||
pixelSize: Constants.fontSize
|
||||
bold: true
|
||||
}
|
||||
|
||||
function updateTime() {
|
||||
text = Qt.formatDateTime(new Date(), "ddd, MMM dd - HH:mm");
|
||||
}
|
||||
|
||||
Component.onCompleted: updateTime()
|
||||
|
||||
Timer {
|
||||
interval: 1000
|
||||
running: true
|
||||
repeat: true
|
||||
onTriggered: clock.updateTime()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user