WIP - modular bar (need to fix brightness & tray)
This commit is contained in:
parent
8f951946ea
commit
8e562e0701
31 changed files with 785 additions and 136 deletions
39
Modules/Bar/Widgets/Clock.qml
Normal file
39
Modules/Bar/Widgets/Clock.qml
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
import QtQuick
|
||||
import qs.Commons
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
// Clock Icon with attached calendar
|
||||
Rectangle {
|
||||
id: root
|
||||
width: clock.width + Style.marginM * 2 * scaling
|
||||
height: Math.round(Style.capsuleHeight * scaling)
|
||||
radius: Math.round(Style.radiusM * scaling)
|
||||
color: Color.mSurfaceVariant
|
||||
|
||||
NClock {
|
||||
id: clock
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
NTooltip {
|
||||
id: tooltip
|
||||
text: Time.dateString
|
||||
target: clock
|
||||
positionAbove: Settings.data.bar.position === "bottom"
|
||||
}
|
||||
|
||||
onEntered: {
|
||||
if (!calendarPanel.active) {
|
||||
tooltip.show()
|
||||
}
|
||||
}
|
||||
onExited: {
|
||||
tooltip.hide()
|
||||
}
|
||||
onClicked: {
|
||||
tooltip.hide()
|
||||
calendarPanel.toggle(screen)
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue