dashboard on right, change trigger to clock
This commit is contained in:
+11
-6
@@ -1,3 +1,4 @@
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.Config
|
||||
@@ -6,6 +7,7 @@ import qs.Helpers as Helpers
|
||||
import qs.Components
|
||||
|
||||
Item {
|
||||
required property PersistentProperties visibilities
|
||||
required property Wrapper popouts
|
||||
required property RowLayout loader
|
||||
|
||||
@@ -35,12 +37,15 @@ Item {
|
||||
StateLayer {
|
||||
acceptedButtons: Qt.LeftButton
|
||||
onClicked: {
|
||||
if ( mouse.button === Qt.LeftButton && !visibilities.sidebar ) {
|
||||
Helpers.Calendar.displayYear = new Date().getFullYear();
|
||||
Helpers.Calendar.displayMonth = new Date().getMonth();
|
||||
root.popouts.currentName = "calendar";
|
||||
root.popouts.currentCenter = Qt.binding( () => item.mapToItem( root.loader, root.implicitWidth / 2, 0 ).x );
|
||||
root.popouts.hasCurrent = true;
|
||||
root.visibilities.dashboard = !root.visibilities.dashboard;
|
||||
if ( root.visibilities.sidebar || root.popouts.hasCurrent ) {
|
||||
// Helpers.Calendar.displayYear = new Date().getFullYear();
|
||||
// Helpers.Calendar.displayMonth = new Date().getMonth();
|
||||
// root.popouts.currentName = "calendar";
|
||||
// root.popouts.currentCenter = Qt.binding( () => item.mapToItem( root.loader, root.implicitWidth / 2, 0 ).x );
|
||||
// root.popouts.hasCurrent = true;
|
||||
root.popouts.hasCurrent = false;
|
||||
root.visibilities.sidebar = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user