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) | 50 | GridView { | |||
---|---|---|---|---|---|
54 | 54 | | |||
55 | cellWidth: Math.floor(wallpapersGrid.width / Math.max(Math.floor(wallpapersGrid.width / (units.gridUnit*12)), 3)) | 55 | cellWidth: Math.floor(wallpapersGrid.width / Math.max(Math.floor(wallpapersGrid.width / (units.gridUnit*12)), 3)) | ||
56 | cellHeight: cellWidth / (imageWallpaper.width / imageWallpaper.height) | 56 | cellHeight: cellWidth / (imageWallpaper.width / imageWallpaper.height) | ||
57 | 57 | | |||
58 | anchors.margins: 4 | 58 | anchors.margins: 4 | ||
59 | boundsBehavior: Flickable.DragAndOvershootBounds | 59 | boundsBehavior: Flickable.DragAndOvershootBounds | ||
60 | 60 | | |||
61 | delegate: WallpaperDelegate {} | 61 | delegate: WallpaperDelegate {} | ||
62 | Timer { | 62 | | ||
63 | id: makeCurrentTimer | 63 | onCountChanged: { | ||
64 | interval: 100 | 64 | wallpapersGrid.currentIndex = imageWallpaper.wallpaperModel.indexOf(cfg_Image); | ||
65 | repeat: false | 65 | wallpapersGrid.positionViewAtIndex(wallpapersGrid.currentIndex, GridView.Visible) | ||
66 | property string pendingIndex | | |||
67 | onTriggered: { | | |||
68 | wallpapersGrid.currentIndex = pendingIndex | | |||
69 | } | | |||
70 | } | 66 | } | ||
71 | 67 | | |||
72 | Connections { | 68 | Connections { | ||
73 | target: imageWallpaper | 69 | target: imageWallpaper | ||
74 | onCustomWallpaperPicked: wallpapersGrid.currentIndex = 0 | 70 | onCustomWallpaperPicked: wallpapersGrid.currentIndex = 0 | ||
75 | } | 71 | } | ||
76 | } | 72 | } | ||
77 | } | 73 | } | ||
Show All 16 Lines |