change up wallpapper picker

This commit is contained in:
lucy 2026-08-16 02:14:44 +02:00
commit 1686141966
2 changed files with 28 additions and 33 deletions

View file

@ -9,8 +9,8 @@ Singleton {
// --- The Backgrounds (Darkest to Lightest) ---
readonly property color accent: base0D
readonly property color barBg: base01
readonly property color moduleBg: Qt.hsla(base01.hslHue, base01.hslSaturation, base01.hslLightness + 0.05, 1.0)
readonly property color barBg: base00
readonly property color moduleBg: Qt.hsla(barBg.hslHue, barBg.hslSaturation, barBg.hslLightness + 0.05, 1.0)
readonly property color activeModuleBg: Qt.hsla(base01.hslHue, base01.hslSaturation, base01.hslLightness + 0.1, 1.0)
readonly property color text: base06
readonly property color base00: "#" + viewer.base00

View file

@ -71,17 +71,15 @@ Rectangle {
if (wallPicker.visible)
container.forceActiveFocus();
}
ClippingRectangle {
Rectangle {
id: container
focus: true
Keys.onEscapePressed: {
wallPicker.visible = false;
}
anchors.fill: parent
color: Colors.base01
color: Colors.base00
radius: Config.rounding
border.width: 2
border.color: Colors.base0D
GridView {
id: wallpaperLayout
clip: true
@ -90,37 +88,34 @@ Rectangle {
cellHeight: container.height
cellWidth: container.width / 8
anchors.fill: parent
anchors.rightMargin: 10
anchors.centerIn: parent
anchors.margins: 10
model: wallpaperList
delegate: ClippingWrapperRectangle {
delegate: ClippingRectangle {
id: wallTile
margin: 10
clip: true
required property var modelData
radius: Config.rounding / 1.5
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
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;
}
}
}