summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/Shortcuts.qml9
-rw-r--r--modules/background/Wallpaper.qml14
-rw-r--r--modules/dashboard/Tabs.qml8
-rw-r--r--modules/dashboard/dash/User.qml8
-rw-r--r--modules/drawers/Interactions.qml86
-rw-r--r--modules/notifications/Notification.qml5
6 files changed, 105 insertions, 25 deletions
diff --git a/modules/Shortcuts.qml b/modules/Shortcuts.qml
index bed620c..3d665ff 100644
--- a/modules/Shortcuts.qml
+++ b/modules/Shortcuts.qml
@@ -9,6 +9,15 @@ Scope {
property bool launcherInterrupted
CustomShortcut {
+ name: "showall"
+ description: "Toggle launcher, dashboard and osd"
+ onPressed: {
+ const v = Visibilities.getForActive();
+ v.launcher = v.dashboard = v.osd = !(v.launcher || v.dashboard || v.osd);
+ }
+ }
+
+ CustomShortcut {
name: "session"
description: "Toggle session menu"
onPressed: {
diff --git a/modules/background/Wallpaper.qml b/modules/background/Wallpaper.qml
index 2734034..f4e3243 100644
--- a/modules/background/Wallpaper.qml
+++ b/modules/background/Wallpaper.qml
@@ -8,7 +8,7 @@ import QtQuick
Item {
id: root
- property url source: Wallpapers.current ? `file://${Wallpapers.current}` : ""
+ property string source: Wallpapers.current
property Image current: one
anchors.fill: parent
@@ -32,20 +32,14 @@ Item {
id: img
function update(): void {
- const srcPath = `${root.source}`.slice(7);
- if (thumbnail.originalPath === srcPath) {
+ if (path === root.source)
root.current = this;
- } else
- path = srcPath;
+ else
+ path = root.source;
}
anchors.fill: parent
- loadOriginal: true
- asynchronous: true
- cache: false
- fillMode: Image.PreserveAspectCrop
-
opacity: 0
scale: Wallpapers.showPreview ? 1 : 0.8
diff --git a/modules/dashboard/Tabs.qml b/modules/dashboard/Tabs.qml
index db7796a..46cbd76 100644
--- a/modules/dashboard/Tabs.qml
+++ b/modules/dashboard/Tabs.qml
@@ -38,10 +38,10 @@ Item {
text: qsTr("Performance")
}
- Tab {
- iconName: "workspaces"
- text: qsTr("Workspaces")
- }
+ // Tab {
+ // iconName: "workspaces"
+ // text: qsTr("Workspaces")
+ // }
}
Item {
diff --git a/modules/dashboard/dash/User.qml b/modules/dashboard/dash/User.qml
index c7d2bfd..d2dc4e7 100644
--- a/modules/dashboard/dash/User.qml
+++ b/modules/dashboard/dash/User.qml
@@ -10,13 +10,13 @@ Row {
id: root
padding: Appearance.padding.large
- spacing: Appearance.spacing.large
+ spacing: Appearance.spacing.normal
StyledClippingRect {
implicitWidth: info.implicitHeight
implicitHeight: info.implicitHeight
- radius: Appearance.rounding.full
+ radius: Appearance.rounding.large
color: Colours.palette.m3surfaceContainerHigh
MaterialIcon {
@@ -69,8 +69,8 @@ Row {
running: true
command: ["uptime", "-p"]
- stdout: SplitParser {
- onRead: data => uptimeProc.uptime = data
+ stdout: StdioCollector {
+ onStreamFinished: uptimeProc.uptime = text
}
}
}
diff --git a/modules/drawers/Interactions.qml b/modules/drawers/Interactions.qml
index 3ec522b..10e37a8 100644
--- a/modules/drawers/Interactions.qml
+++ b/modules/drawers/Interactions.qml
@@ -16,6 +16,8 @@ MouseArea {
property bool osdHovered
property point dragStart
+ property bool dashboardShortcutActive
+ property bool osdShortcutActive
function withinPanelHeight(panel: Item, x: real, y: real): bool {
const panelY = BorderConfig.thickness + panel.y;
@@ -37,9 +39,14 @@ MouseArea {
onPressed: event => dragStart = Qt.point(event.x, event.y)
onContainsMouseChanged: {
if (!containsMouse) {
- visibilities.osd = false;
- osdHovered = false;
- visibilities.dashboard = false;
+ // Only hide if not activated by shortcut
+ if (!osdShortcutActive) {
+ visibilities.osd = false;
+ osdHovered = false;
+ }
+ if (!dashboardShortcutActive) {
+ visibilities.dashboard = false;
+ }
popouts.hasCurrent = false;
}
}
@@ -47,8 +54,16 @@ MouseArea {
onPositionChanged: ({x, y}) => {
// Show osd on hover
const showOsd = inRightPanel(panels.osd, x, y);
- visibilities.osd = showOsd;
- osdHovered = showOsd;
+
+ // Always update visibility based on hover if not in shortcut mode
+ if (!osdShortcutActive) {
+ visibilities.osd = showOsd;
+ osdHovered = showOsd;
+ } else if (showOsd) {
+ // If hovering over OSD area while in shortcut mode, transition to hover control
+ osdShortcutActive = false;
+ osdHovered = true;
+ }
// Show/hide session on drag
if (pressed && withinPanelHeight(panels.session, x, y)) {
@@ -60,7 +75,15 @@ MouseArea {
}
// Show dashboard on hover
- visibilities.dashboard = inTopPanel(panels.dashboard, x, y);
+ const showDashboard = inTopPanel(panels.dashboard, x, y);
+
+ // Always update visibility based on hover if not in shortcut mode
+ if (!dashboardShortcutActive) {
+ visibilities.dashboard = showDashboard;
+ } else if (showDashboard) {
+ // If hovering over dashboard area while in shortcut mode, transition to hover control
+ dashboardShortcutActive = false;
+ }
// Show popouts on hover
const popout = panels.popouts;
@@ -75,6 +98,57 @@ MouseArea {
popouts.hasCurrent = false;
}
+ // Monitor individual visibility changes
+ Connections {
+ target: root.visibilities
+
+ function onLauncherChanged() {
+ // If launcher is hidden, clear shortcut flags for dashboard and OSD
+ if (!root.visibilities.launcher) {
+ root.dashboardShortcutActive = false;
+ root.osdShortcutActive = false;
+
+ // Also hide dashboard and OSD if they're not being hovered
+ const inDashboardArea = root.inTopPanel(root.panels.dashboard, root.mouseX, root.mouseY);
+ const inOsdArea = root.inRightPanel(root.panels.osd, root.mouseX, root.mouseY);
+
+ if (!inDashboardArea) {
+ root.visibilities.dashboard = false;
+ }
+ if (!inOsdArea) {
+ root.visibilities.osd = false;
+ root.osdHovered = false;
+ }
+ }
+ }
+
+ function onDashboardChanged() {
+ if (root.visibilities.dashboard) {
+ // Dashboard became visible, immediately check if this should be shortcut mode
+ const inDashboardArea = root.inTopPanel(root.panels.dashboard, root.mouseX, root.mouseY);
+ if (!inDashboardArea) {
+ root.dashboardShortcutActive = true;
+ }
+ } else {
+ // Dashboard hidden, clear shortcut flag
+ root.dashboardShortcutActive = false;
+ }
+ }
+
+ function onOsdChanged() {
+ if (root.visibilities.osd) {
+ // OSD became visible, immediately check if this should be shortcut mode
+ const inOsdArea = root.inRightPanel(root.panels.osd, root.mouseX, root.mouseY);
+ if (!inOsdArea) {
+ root.osdShortcutActive = true;
+ }
+ } else {
+ // OSD hidden, clear shortcut flag
+ root.osdShortcutActive = false;
+ }
+ }
+ }
+
Osd.Interactions {
screen: root.screen
visibilities: root.visibilities
diff --git a/modules/notifications/Notification.qml b/modules/notifications/Notification.qml
index 51ed5f5..848eac4 100644
--- a/modules/notifications/Notification.qml
+++ b/modules/notifications/Notification.qml
@@ -93,7 +93,10 @@ StyledRect {
implicitHeight: root.nonAnimHeight
Behavior on implicitHeight {
- Anim {}
+ Anim {
+ duration: Appearance.anim.durations.expressiveDefaultSpatial
+ easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
+ }
}
Loader {