Differential D3532 Diff 8601 wallpapers/image/imagepackage/platformcontents/phone/ui/WallpaperDelegate.qml
Changeset View
Changeset View
Standalone View
Standalone View
wallpapers/image/imagepackage/platformcontents/phone/ui/WallpaperDelegate.qml
Show All 24 Lines | |||||
25 | MouseArea { | 25 | MouseArea { | ||
26 | id: wallpaperDelegate | 26 | id: wallpaperDelegate | ||
27 | 27 | | |||
28 | width: wallpapersGrid.cellWidth | 28 | width: wallpapersGrid.cellWidth | ||
29 | height: wallpapersGrid.cellHeight | 29 | height: wallpapersGrid.cellHeight | ||
30 | 30 | | |||
31 | property bool selected: (wallpapersGrid.currentIndex == index) | 31 | property bool selected: (wallpapersGrid.currentIndex == index) | ||
32 | 32 | | |||
33 | onSelectedChanged: { | | |||
34 | cfg_Image = model.path | | |||
35 | } | | |||
36 | | ||||
37 | hoverEnabled: true | 33 | hoverEnabled: true | ||
38 | 34 | | |||
39 | 35 | | |||
40 | //note: this *doesn't* use system colors since it represent a | 36 | //note: this *doesn't* use system colors since it represent a | ||
41 | //skeymorphic photograph rather than a widget | 37 | //skeymorphic photograph rather than a widget | ||
42 | Rectangle { | 38 | Rectangle { | ||
43 | id: background | 39 | id: background | ||
44 | color: "white" | 40 | color: "white" | ||
▲ Show 20 Lines • Show All 80 Lines • ▼ Show 20 Line(s) | |||||
125 | } | 121 | } | ||
126 | 122 | | |||
127 | onClicked: { | 123 | onClicked: { | ||
128 | wallpapersGrid.currentIndex = index | 124 | wallpapersGrid.currentIndex = index | ||
129 | cfg_Image = model.path | 125 | cfg_Image = model.path | ||
130 | } | 126 | } | ||
131 | 127 | | |||
132 | onExited: Tooltip.hideText() | 128 | onExited: Tooltip.hideText() | ||
133 | | ||||
134 | Component.onCompleted: { | | |||
135 | if (cfg_Image == model.path) { | | |||
136 | makeCurrentTimer.pendingIndex = model.index | | |||
137 | makeCurrentTimer.restart() | | |||
138 | } | | |||
139 | } | | |||
140 | } | 129 | } |