fix color management and remove shadows

This commit is contained in:
lucy 2026-08-15 23:44:42 +02:00
commit d6740b2aae
10 changed files with 67 additions and 157 deletions

View file

@ -1,11 +1,9 @@
pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Wayland
import Quickshell.Widgets
import Quickshell.Hyprland
import QtQuick
import Qt.labs.folderlistmodel 2.11
import QtQuick.Effects
import qs
import qs.settings
@ -13,17 +11,6 @@ import qs.widgets
Rectangle {
id: main
layer.enabled: true
layer.effect: MultiEffect {
id: dropShadow
source: main
shadowEnabled: true
shadowHorizontalOffset: 4
shadowVerticalOffset: 2
shadowOpacity: 0.5
shadowColor: "#020202"
}
required property real moduleHeight
required property int screenHeight
color: Colors.moduleBg
@ -46,7 +33,8 @@ Rectangle {
}
WlrLayershell {
id: wallPicker
visible: false
visible: true
layer: WlrLayer.Top
exclusionMode: ExclusionMode.Ignore
keyboardFocus: WlrKeyboardFocus.OnDemand
implicitHeight: main.screenHeight / 8
@ -71,7 +59,7 @@ Rectangle {
if (wallPicker.visible)
container.forceActiveFocus();
}
ClippingRectangle {
Rectangle {
id: container
focus: true
Keys.onEscapePressed: {
@ -88,39 +76,38 @@ Rectangle {
snapMode: GridView.SnapOneRow
flow: GridView.FlowTopToBottom
cellHeight: container.height
cellWidth: container.width / 8
cellWidth: container.width / 7
anchors.fill: parent
anchors.rightMargin: 10
anchors.centerIn: container
anchors.margins: 20
model: wallpaperList
delegate: ClippingWrapperRectangle {
delegate: Rectangle {
id: wallTile
margin: 10
required property var modelData
color: 'transparent'
implicitWidth: wallPicker.width / 8
implicitHeight: wallPicker.height
child: ClippingRectangle {
id: wpRounder
color: 'transparent'
radius: Config.rounding / 1.5
Image {
id: wallpaper
anchors.fill: parent
source: wallTile.modelData.filePath
sourceSize.width: 16 * 30
sourceSize.height: 9 * 30
asynchronous: true
cache: true
}
MouseArea {
id: wpClickHandler
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
acceptedButtons: Qt.LeftButton
hoverEnabled: true
onClicked: {
Config.wallpaper = wallTile.modelData.filePath;
}
implicitWidth: wallpaperLayout.cellWidth - 20
implicitHeight: wallpaperLayout.cellHeight - 20
anchors.margins: 20
clip: true
radius: 16
Image {
id: wallpaper
source: wallTile.modelData.filePath
sourceSize.width: 16 * 20
sourceSize.height: 9 * 20
asynchronous: true
anchors.fill: parent
anchors.verticalCenter: parent.verticalCenter
cache: true
}
MouseArea {
id: wpClickHandler
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
acceptedButtons: Qt.LeftButton
hoverEnabled: true
onClicked: {
Config.wallpaper = wallTile.modelData.filePath;
}
}
}