hover background color config option
This commit is contained in:
@@ -99,6 +99,7 @@ Scope {
|
||||
color: "white"
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
ncProcess.running = true
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import Quickshell.Io
|
||||
|
||||
JsonObject {
|
||||
property BgColors backgrounds: BgColors {}
|
||||
|
||||
component BgColors: JsonObject {
|
||||
property string hover: "#15ffffff"
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ Singleton {
|
||||
property alias maxWallpapers: adapter.maxWallpapers
|
||||
property alias wallust: adapter.wallust
|
||||
property alias workspaceWidget: adapter.workspaceWidget
|
||||
property alias colors: adapter.colors
|
||||
|
||||
FileView {
|
||||
id: root
|
||||
@@ -35,6 +36,7 @@ Singleton {
|
||||
property int maxWallpapers: 7
|
||||
property bool wallust: false
|
||||
property WorkspaceWidget workspaceWidget: WorkspaceWidget {}
|
||||
property Colors colors: Colors {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+18
-1
@@ -3,6 +3,7 @@ import Quickshell
|
||||
import Quickshell.Services.SystemTray
|
||||
import Quickshell.Io
|
||||
import qs.Modules
|
||||
import qs.Config
|
||||
|
||||
MouseArea {
|
||||
id: root
|
||||
@@ -12,7 +13,7 @@ MouseArea {
|
||||
property point globalPos
|
||||
property bool hasLoaded: false
|
||||
|
||||
implicitWidth: 22
|
||||
implicitWidth: 24
|
||||
|
||||
hoverEnabled: true
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
@@ -21,6 +22,22 @@ MouseArea {
|
||||
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 {
|
||||
id: icon
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ Scope {
|
||||
source: WallpaperPath.currentWallpaperPath
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
|
||||
smooth: true
|
||||
asynchronous: true
|
||||
retainWhileLoading: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user