refactor: unified BarModule base component, click-to-open panels, remove pinning
This commit is contained in:
parent
034f0b6d85
commit
26476dc930
33 changed files with 273 additions and 517 deletions
|
|
@ -4,10 +4,10 @@ import "." as M
|
|||
import "../services" as S
|
||||
import "../applets" as C
|
||||
|
||||
M.PinnableSection {
|
||||
M.BarModule {
|
||||
id: root
|
||||
spacing: S.Theme.moduleSpacing
|
||||
_panelHovered: hoverPanel.panelHovered
|
||||
tooltip: Qt.formatDateTime(clock.date, "dddd, dd. MMMM yyyy")
|
||||
|
||||
SystemClock {
|
||||
id: clock
|
||||
|
|
@ -19,9 +19,6 @@ M.PinnableSection {
|
|||
label: Qt.formatDateTime(clock.date, "ddd, dd. MMM HH:mm")
|
||||
minText: "Wed, 00. Sep 00:00"
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
TapHandler {
|
||||
onTapped: root._pinned = !root._pinned
|
||||
}
|
||||
}
|
||||
|
||||
M.HoverPanel {
|
||||
|
|
@ -33,6 +30,7 @@ M.PinnableSection {
|
|||
panelNamespace: "nova-clock"
|
||||
panelTitle: Qt.formatTime(clock.date, "HH:mm:ss")
|
||||
contentWidth: 220
|
||||
onDismissed: root.dismissPanel()
|
||||
|
||||
C.ClockApplet {
|
||||
width: hoverPanel.contentWidth
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue