Verified Commit bf97a204 authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

wallpapers/image: scroll to top to view added images after DnD operations

CCBUG: 455129
parent c857d3ba
......@@ -17,6 +17,8 @@ Item {
id: thumbnailsComponent
anchors.fill: parent
property alias view: wallpapersGrid.view
readonly property var imageModel: (configDialog.currentWallpaper === "org.kde.image") ? imageWallpaper.wallpaperModel : imageWallpaper.slideFilterModel
Connections {
......
......@@ -184,9 +184,14 @@ ColumnLayout {
imageWallpaper.addSlidePath(url);
}
});
// Scroll to top to view added images
if (configDialog.currentWallpaper === "org.kde.image") {
thumbnailsLoader.item.view.positionViewAtIndex(0, GridView.Beginning);
}
}
Loader {
id: thumbnailsLoader
anchors.fill: parent
source: (configDialog.currentWallpaper == "org.kde.image") ? "ThumbnailsComponent.qml" :
((configDialog.currentWallpaper == "org.kde.slideshow") ? "SlideshowComponent.qml" : "")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment