diff --git a/config/Paths.qml b/config/Paths.qml new file mode 100644 index 0000000..21a23f3 --- /dev/null +++ b/config/Paths.qml @@ -0,0 +1,13 @@ +import QtQuick +import Quickshell + +Singleton { + id: root + + readonly property url cache: `${StandardPaths.standardLocations(StandardPaths.GenericCacheLocation)[0]}/lux` + readonly property url config: `${StandardPaths.standardLocations(StandardPaths.GenericConfigLocation)[0]}/quickshell` + readonly property url data: `${StandardPaths.standardLocations(StandardPaths.GenericDataLocation)[0]}/lux` + readonly property url home: StandardPaths.standardLocations(StandardPaths.HomeLocation)[0] + readonly property url state: `${StandardPaths.standardLocations(StandardPaths.GenericStateLocation)[0]}/lux` + readonly property url wallpapers: `${StandardPaths.standardLocations(StandardPaths.HomeLocation)[0]}/Wallpapers` +} diff --git a/modules/bar/components/bluetooth/Bluetooth.qml b/modules/bar/components/bluetooth/Bluetooth.qml index 2414f69..b39e7b8 100644 --- a/modules/bar/components/bluetooth/Bluetooth.qml +++ b/modules/bar/components/bluetooth/Bluetooth.qml @@ -1,15 +1,18 @@ import qs.config import qs.constants -import qs.widgets +import qs.styled -StyledButton { +Clickable { id: root + implicitWidth: text.width + implicitHeight: Dimensions.bluetooth.height + onClicked: { popup.opened = !popup.opened; } - content: StyledText { + StyledText { id: text font.family: Theme.lucide.font.family @@ -18,6 +21,12 @@ StyledButton { text: Icons.bluetooth color: root.containsMouse ? Theme.palette.base300 : Theme.palette.basecontent + + anchors.verticalCenter: parent.verticalCenter + topPadding: Dimensions.bluetooth.verticalPadding + bottomPadding: Dimensions.bluetooth.verticalPadding + leftPadding: Dimensions.bluetooth.horizontalPadding + rightPadding: Dimensions.bluetooth.horizontalPadding } BluetoothMenu { diff --git a/modules/bar/components/hyprland/Workspace.qml b/modules/bar/components/hyprland/Workspace.qml index d03298e..d943bed 100644 --- a/modules/bar/components/hyprland/Workspace.qml +++ b/modules/bar/components/hyprland/Workspace.qml @@ -1,8 +1,8 @@ -import qs.config -import qs.constants -import qs.widgets import QtQuick import Quickshell.Hyprland +import "../../../../config" +import "../../../../constants/" +import "../../../../styled/" Loader { required property HyprlandWorkspace modelData @@ -10,12 +10,15 @@ Loader { active: modelData.id > 0 sourceComponent: workspace - property Component workspace: StyledButton { + property Component workspace: Clickable { id: clickable + width: Dimensions.workspace.width + height: Dimensions.workspace.height + onClicked: modelData.activate() - content: Text { + Text { id: icon font.family: Theme.lucide.font.family @@ -25,6 +28,8 @@ Loader { color: Theme.palette.basecontent + anchors.centerIn: parent + states: [ State { name: "focused" diff --git a/modules/bar/components/hyprland/Workspaces.qml b/modules/bar/components/hyprland/Workspaces.qml index 1b1003d..ef52c15 100644 --- a/modules/bar/components/hyprland/Workspaces.qml +++ b/modules/bar/components/hyprland/Workspaces.qml @@ -1,9 +1,9 @@ import QtQuick -import QtQuick.Layouts +import QtQuick.Controls import Quickshell.Hyprland import "../../../../config/" -RowLayout { +Row { id: root spacing: Dimensions.workspace.spacing diff --git a/modules/bar/components/tray/Tray.qml b/modules/bar/components/tray/Tray.qml index ac343f8..0a95718 100644 --- a/modules/bar/components/tray/Tray.qml +++ b/modules/bar/components/tray/Tray.qml @@ -1,11 +1,8 @@ -pragma ComponentBehavior: Bound - -import qs.config import QtQuick -import QtQuick.Layouts import Quickshell.Services.SystemTray +import "../../../../config/" -RowLayout { +Row { id: root spacing: Dimensions.tray.spacing @@ -14,13 +11,12 @@ RowLayout { model: SystemTray.items Loader { - id: loader required property SystemTrayItem modelData active: true sourceComponent: item property Component item: TrayItem { - trayItem: loader.modelData + trayItem: modelData } } }