Changeset View
Changeset View
Standalone View
Standalone View
wallpapers/image/imagepackage/platformcontents/phone/ui/config.qml
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Line(s) | 49 | GridView { | |||
---|---|---|---|---|---|
54 | cellWidth: Math.floor(wallpapersGrid.width / Math.max(Math.floor(wallpapersGrid.width / (units.gridUnit*12)), 3)) | 54 | cellWidth: Math.floor(wallpapersGrid.width / Math.max(Math.floor(wallpapersGrid.width / (units.gridUnit*12)), 3)) | ||
55 | cellHeight: cellWidth / (plasmoid.width / plasmoid.height) | 55 | cellHeight: cellWidth / (plasmoid.width / plasmoid.height) | ||
56 | 56 | | |||
57 | anchors.margins: 4 | 57 | anchors.margins: 4 | ||
58 | boundsBehavior: Flickable.DragAndOvershootBounds | 58 | boundsBehavior: Flickable.DragAndOvershootBounds | ||
59 | 59 | | |||
60 | delegate: WallpaperDelegate {} | 60 | delegate: WallpaperDelegate {} | ||
61 | 61 | | |||
62 | onCountChanged: { | 62 | function onCountChanged() { | ||
63 | wallpapersGrid.currentIndex = imageWallpaper.wallpaperModel.indexOf(cfg_Image); | 63 | wallpapersGrid.currentIndex = imageWallpaper.wallpaperModel.indexOf(cfg_Image); | ||
64 | wallpapersGrid.positionViewAtIndex(wallpapersGrid.currentIndex, GridView.Visible) | 64 | wallpapersGrid.positionViewAtIndex(wallpapersGrid.currentIndex, GridView.Visible) | ||
65 | } | 65 | } | ||
66 | 66 | | |||
67 | Connections { | 67 | Connections { | ||
68 | target: imageWallpaper | 68 | target: imageWallpaper | ||
69 | onCustomWallpaperPicked: wallpapersGrid.currentIndex = 0 | 69 | onCustomWallpaperPicked: wallpapersGrid.currentIndex = 0 | ||
70 | } | 70 | } | ||
Show All 18 Lines |