forked from Shinonome/dots-hyprland
wallpaper selector: add shadows
This commit is contained in:
@@ -26,9 +26,17 @@ Item {
|
|||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
spacing: 8
|
spacing: 8
|
||||||
|
|
||||||
|
Item {
|
||||||
|
implicitHeight: filterField.implicitHeight
|
||||||
|
implicitWidth: filterField.implicitWidth
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
|
StyledRectangularShadow {
|
||||||
|
target: filterField
|
||||||
|
}
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
id: filterField
|
id: filterField
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
implicitHeight: 40
|
implicitHeight: 40
|
||||||
implicitWidth: Appearance.sizes.searchWidth
|
implicitWidth: Appearance.sizes.searchWidth
|
||||||
padding: 10
|
padding: 10
|
||||||
@@ -91,15 +99,24 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
implicitWidth: wallpaperGridBackground.implicitWidth
|
||||||
|
implicitHeight: wallpaperGridBackground.implicitHeight
|
||||||
|
|
||||||
|
StyledRectangularShadow {
|
||||||
|
target: wallpaperGridBackground
|
||||||
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: bg
|
id: wallpaperGridBackground
|
||||||
focus: true
|
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
color: Appearance.colors.colLayer0
|
color: Appearance.colors.colLayer0
|
||||||
|
radius: Appearance.rounding.screenRounding
|
||||||
border.width: 1
|
border.width: 1
|
||||||
border.color: Appearance.colors.colLayer0Border
|
border.color: Appearance.colors.colLayer0Border
|
||||||
radius: Appearance.rounding.screenRounding
|
focus: true
|
||||||
// Layout.alignment: Qt.AlignHCenter
|
|
||||||
|
|
||||||
property int calculatedRows: Math.ceil(grid.count / grid.columns)
|
property int calculatedRows: Math.ceil(grid.count / grid.columns)
|
||||||
|
|
||||||
@@ -239,9 +256,9 @@ Item {
|
|||||||
source: {
|
source: {
|
||||||
const resolvedUrl = Qt.resolvedUrl(modelData);
|
const resolvedUrl = Qt.resolvedUrl(modelData);
|
||||||
const md5Hash = Qt.md5(resolvedUrl);
|
const md5Hash = Qt.md5(resolvedUrl);
|
||||||
const cacheSize = "normal"
|
const cacheSize = "normal";
|
||||||
const thumbnailPath = `${Directories.genericCache}/thumbnails/${cacheSize}/${md5Hash}.png`;
|
const thumbnailPath = `${Directories.genericCache}/thumbnails/${cacheSize}/${md5Hash}.png`;
|
||||||
return thumbnailPath
|
return thumbnailPath;
|
||||||
}
|
}
|
||||||
fillMode: Image.PreserveAspectCrop
|
fillMode: Image.PreserveAspectCrop
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
@@ -341,6 +358,7 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: GlobalStates
|
target: GlobalStates
|
||||||
@@ -350,5 +368,4 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user