Changeset View
Changeset View
Standalone View
Standalone View
wallpapers/image/imagepackage/platformcontents/touch/ui/config.qml
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | 53 | anchors { | |||
---|---|---|---|---|---|
57 | left: parent.left | 57 | left: parent.left | ||
58 | right: parent.right | 58 | right: parent.right | ||
59 | } | 59 | } | ||
60 | 60 | | |||
61 | delegateWidth: Math.floor(wallpapersGrid.width / Math.max(Math.floor(wallpapersGrid.width / (units.gridUnit*12)), 3)) | 61 | delegateWidth: Math.floor(wallpapersGrid.width / Math.max(Math.floor(wallpapersGrid.width / (units.gridUnit*12)), 3)) | ||
62 | delegateHeight: delegateWidth / 1.6 | 62 | delegateHeight: delegateWidth / 1.6 | ||
63 | 63 | | |||
64 | delegate: WallpaperDelegate {} | 64 | delegate: WallpaperDelegate {} | ||
65 | Timer { | 65 | | ||
66 | id: makeCurrentTimer | 66 | onCountChanged: { | ||
67 | interval: 100 | 67 | wallpapersGrid.currentIndex = imageWallpaper.wallpaperModel.indexOf(cfg_Image); | ||
68 | repeat: false | 68 | wallpapersGrid.positionViewAtIndex(wallpapersGrid.currentIndex, GridView.Visible) | ||
69 | property string pendingIndex | | |||
70 | onTriggered: { | | |||
71 | wallpapersGrid.currentIndex = pendingIndex | | |||
72 | wallpapersGrid.positionViewAtIndex(pendingIndex, ListView.Beginning) | | |||
73 | } | | |||
74 | } | 69 | } | ||
75 | 70 | | |||
76 | Connections { | 71 | Connections { | ||
77 | target: imageWallpaper | 72 | target: imageWallpaper | ||
78 | onCustomWallpaperPicked: wallpapersGrid.currentIndex = 0 | 73 | onCustomWallpaperPicked: wallpapersGrid.currentIndex = 0 | ||
79 | } | 74 | } | ||
80 | } | 75 | } | ||
81 | } | 76 | } |