hover background color config option
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 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
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user