fix: segfault
This commit is contained in:
parent
de0aa60dd3
commit
17f99eafd0
1 changed files with 31 additions and 24 deletions
|
|
@ -23,7 +23,15 @@ PanelWindow {
|
||||||
Connections {
|
Connections {
|
||||||
target: WallpaperManager
|
target: WallpaperManager
|
||||||
function onWallpaperListChanged() {
|
function onWallpaperListChanged() {
|
||||||
wallpapers = WallpaperManager.wallpaperList;
|
wallpapers = WallpaperManager.wallpaperList
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onVisibleChanged: {
|
||||||
|
if (wallpaperPanelModal.visible) {
|
||||||
|
wallpapers = WallpaperManager.wallpaperList
|
||||||
|
} else {
|
||||||
|
wallpapers = []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -104,7 +112,7 @@ PanelWindow {
|
||||||
cellWidth: Math.max(120, (scrollView.width / 3) - 12)
|
cellWidth: Math.max(120, (scrollView.width / 3) - 12)
|
||||||
cellHeight: cellWidth * 0.6
|
cellHeight: cellWidth * 0.6
|
||||||
model: wallpapers
|
model: wallpapers
|
||||||
cacheBuffer: 0
|
cacheBuffer: 32
|
||||||
leftMargin: 8
|
leftMargin: 8
|
||||||
rightMargin: 8
|
rightMargin: 8
|
||||||
topMargin: 8
|
topMargin: 8
|
||||||
|
|
@ -112,14 +120,7 @@ PanelWindow {
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
width: wallpaperGrid.cellWidth - 8
|
width: wallpaperGrid.cellWidth - 8
|
||||||
height: wallpaperGrid.cellHeight - 8
|
height: wallpaperGrid.cellHeight - 8
|
||||||
MouseArea {
|
ClippingRectangle {
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
onClicked: {
|
|
||||||
WallpaperManager.changeWallpaper(modelData);
|
|
||||||
}
|
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
|
||||||
id: wallpaperItem
|
id: wallpaperItem
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: 4
|
anchors.margins: 4
|
||||||
|
|
@ -137,6 +138,12 @@ PanelWindow {
|
||||||
sourceSize.width: Math.min(width, 150)
|
sourceSize.width: Math.min(width, 150)
|
||||||
sourceSize.height: Math.min(height, 90)
|
sourceSize.height: Math.min(height, 90)
|
||||||
}
|
}
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
onClicked: {
|
||||||
|
WallpaperManager.changeWallpaper(modelData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue