hover background color config option

This commit is contained in:
Zacharias-Brohn
2025-11-19 00:02:04 +01:00
parent 36cf913830
commit ddae364005
5 changed files with 31 additions and 1 deletions
+1
View File
@@ -99,6 +99,7 @@ Scope {
color: "white" color: "white"
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: { onClicked: {
ncProcess.running = true ncProcess.running = true
} }
+9
View File
@@ -0,0 +1,9 @@
import Quickshell.Io
JsonObject {
property BgColors backgrounds: BgColors {}
component BgColors: JsonObject {
property string hover: "#15ffffff"
}
}
+2
View File
@@ -13,6 +13,7 @@ Singleton {
property alias maxWallpapers: adapter.maxWallpapers property alias maxWallpapers: adapter.maxWallpapers
property alias wallust: adapter.wallust property alias wallust: adapter.wallust
property alias workspaceWidget: adapter.workspaceWidget property alias workspaceWidget: adapter.workspaceWidget
property alias colors: adapter.colors
FileView { FileView {
id: root id: root
@@ -35,6 +36,7 @@ Singleton {
property int maxWallpapers: 7 property int maxWallpapers: 7
property bool wallust: false property bool wallust: false
property WorkspaceWidget workspaceWidget: WorkspaceWidget {} property WorkspaceWidget workspaceWidget: WorkspaceWidget {}
property Colors colors: Colors {}
} }
} }
} }
+18 -1
View File
@@ -3,6 +3,7 @@ import Quickshell
import Quickshell.Services.SystemTray import Quickshell.Services.SystemTray
import Quickshell.Io import Quickshell.Io
import qs.Modules import qs.Modules
import qs.Config
MouseArea { MouseArea {
id: root id: root
@@ -12,7 +13,7 @@ MouseArea {
property point globalPos property point globalPos
property bool hasLoaded: false property bool hasLoaded: false
implicitWidth: 22 implicitWidth: 24
hoverEnabled: true hoverEnabled: true
acceptedButtons: Qt.LeftButton | Qt.RightButton acceptedButtons: Qt.LeftButton | Qt.RightButton
@@ -21,6 +22,22 @@ MouseArea {
globalPos = root.mapToItem(root.bar.backgroundRect, 0, 0); globalPos = root.mapToItem(root.bar.backgroundRect, 0, 0);
} }
Rectangle {
anchors.centerIn: parent
implicitHeight: 28
implicitWidth: 28
radius: 6
anchors.verticalCenter: parent.verticalCenter
color: root.containsMouse ? Config.colors.backgrounds.hover : "transparent"
Behavior on color {
ColorAnimation {
duration: MaterialEasing.expressiveEffectsTime
easing.bezierCurve: MaterialEasing.expressiveEffects
}
}
}
Image { Image {
id: icon id: icon
+1
View File
@@ -27,6 +27,7 @@ Scope {
source: WallpaperPath.currentWallpaperPath source: WallpaperPath.currentWallpaperPath
fillMode: Image.PreserveAspectCrop fillMode: Image.PreserveAspectCrop
smooth: true
asynchronous: true asynchronous: true
retainWhileLoading: true retainWhileLoading: true