From cc70dc5e0e7f9444c4ae1a5c6cd3d9300b2c3ae3 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 4 Oct 2025 18:12:25 +0800 Subject: basic stepping stone --- bar/Bar.qml | 14 +++++++++++++- bar/TimeDate.qml | 3 +-- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'bar') diff --git a/bar/Bar.qml b/bar/Bar.qml index 70a633c..5e4523d 100644 --- a/bar/Bar.qml +++ b/bar/Bar.qml @@ -4,6 +4,8 @@ import QtQuick.Layouts import qs.components import qs.config +import ".." + Scope { id: root @@ -154,6 +156,15 @@ Scope { easing.type: Easing.InOutQuad } } + MouseArea { + anchors.fill: parent + onPressed: { + Global.ccProp.active = !Global.ccProp.active; + let pos = parent.mapToGlobal(0, 0); + Global.ccProp.x = pos.x; + Global.ccProp.y = pos.y; + } + } } } } @@ -168,8 +179,9 @@ Scope { } MouseArea { anchors.fill: parent - cursorShape: Qt.PointingHandCursor hoverEnabled: true + cursorShape: Qt.PointingHandCursor + acceptedButtons: Qt.NoButton // propagate to timedate onEntered: { timeDateCC.showcc = true; } diff --git a/bar/TimeDate.qml b/bar/TimeDate.qml index 3f557c6..20bf446 100644 --- a/bar/TimeDate.qml +++ b/bar/TimeDate.qml @@ -10,8 +10,8 @@ Item { implicitWidth: layout.implicitWidth implicitHeight: layout.implicitHeight + property bool isAlt: false - property bool isCollapsed: false RowLayout { id: layout @@ -110,7 +110,6 @@ Item { } MouseArea { anchors.fill: parent - cursorShape: Qt.PointingHandCursor onPressed: { root.isAlt = !root.isAlt; } -- cgit v1.2.3