summaryrefslogtreecommitdiff
path: root/modules/drawers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/drawers')
-rw-r--r--modules/drawers/Drawers.qml6
-rw-r--r--modules/drawers/Exclusions.qml2
-rw-r--r--modules/drawers/Interactions.qml20
3 files changed, 26 insertions, 2 deletions
diff --git a/modules/drawers/Drawers.qml b/modules/drawers/Drawers.qml
index 72d8446..6a4777a 100644
--- a/modules/drawers/Drawers.qml
+++ b/modules/drawers/Drawers.qml
@@ -107,6 +107,7 @@ Variants {
PersistentProperties {
id: visibilities
+ property bool bar
property bool osd
property bool session
property bool launcher
@@ -132,9 +133,12 @@ Variants {
}
}
- Bar {
+ BarWrapper {
id: bar
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+
screen: scope.modelData
visibilities: visibilities
popouts: panels.popouts
diff --git a/modules/drawers/Exclusions.qml b/modules/drawers/Exclusions.qml
index 5557cdb..390ad68 100644
--- a/modules/drawers/Exclusions.qml
+++ b/modules/drawers/Exclusions.qml
@@ -13,7 +13,7 @@ Scope {
ExclusionZone {
anchors.left: true
- exclusiveZone: root.bar.implicitWidth
+ exclusiveZone: root.bar.exclusiveZone
}
ExclusionZone {
diff --git a/modules/drawers/Interactions.qml b/modules/drawers/Interactions.qml
index 0a00219..9c9aeb3 100644
--- a/modules/drawers/Interactions.qml
+++ b/modules/drawers/Interactions.qml
@@ -60,6 +60,9 @@ MouseArea {
visibilities.utilities = false;
}
popouts.hasCurrent = false;
+
+ if (bar.isHovered && Config.bar.showOnHover)
+ visibilities.bar = false;
}
}
@@ -67,6 +70,23 @@ MouseArea {
const x = event.x;
const y = event.y;
+ // Show bar in non-exclusive mode on hover
+ if (!visibilities.bar && Config.bar.showOnHover && x < bar.implicitWidth) {
+ visibilities.bar = true;
+ bar.isHovered = true;
+ }
+
+ // Show/hide bar on drag
+ if (pressed && dragStart.x < bar.implicitWidth) {
+ const dragX = x - dragStart.x;
+ if (dragX > Config.bar.dragThreshold) {
+ visibilities.bar = true;
+ bar.isHovered = false;
+ } else if (!bar.isHovered && dragX < -Config.bar.dragThreshold) {
+ visibilities.bar = false;
+ }
+ }
+
// Show osd on hover
const showOsd = inRightPanel(panels.osd, x, y);