nixnew/modules/user/modules/quickshell/shell/bar/ClockWidget.qml

41 lines
701 B
QML

import QtQuick
import QtQuick.Layouts
import ".."
OverlayWidget {
expandedWidth: 600
expandedHeight: 600
BarWidgetInner {
implicitHeight: layout.implicitHeight
ColumnLayout {
id: layout
spacing: 0
anchors {
right: parent.right
left: parent.left
}
Text {
Layout.alignment: Qt.AlignHCenter
text: ShellGlobals.time.getHours().toString().padStart(2, '0')
font.pointSize: 18
color: "#a0ffffff"
}
Text {
Layout.alignment: Qt.AlignHCenter
text: ShellGlobals.time.getMinutes().toString().padStart(2, '0')
font.pointSize: 18
color: "#a0ffffff"
}
}
MouseArea {
anchors.fill: parent
onClicked: expanded = !expanded
}
}
}