Changeset View
Changeset View
Standalone View
Standalone View
wallpapers/image/imagepackage/platformcontents/phone/ui/config.qml
Show All 30 Lines | 29 | anchors { | |||
---|---|---|---|---|---|
31 | left: parent.left | 31 | left: parent.left | ||
32 | right: parent.right | 32 | right: parent.right | ||
33 | bottom: parent.bottom | 33 | bottom: parent.bottom | ||
34 | } | 34 | } | ||
35 | property string cfg_Image | 35 | property string cfg_Image | ||
36 | 36 | | |||
37 | Wallpaper.Image { | 37 | Wallpaper.Image { | ||
38 | id: imageWallpaper | 38 | id: imageWallpaper | ||
39 | width: wallpaper.configuration.width | 39 | targetSize: Qt.size(plasmoid.width, plasmoid.height) | ||
40 | height: wallpaper.configuration.height | | |||
41 | } | 40 | } | ||
42 | 41 | | |||
43 | //Rectangle { color: "orange"; x: formAlignment; width: formAlignment; height: 20 } | 42 | //Rectangle { color: "orange"; x: formAlignment; width: formAlignment; height: 20 } | ||
44 | 43 | | |||
45 | QtControls.ScrollView { | 44 | QtControls.ScrollView { | ||
46 | anchors.fill: parent | 45 | anchors.fill: parent | ||
47 | 46 | | |||
48 | frameVisible: true | 47 | frameVisible: true | ||
49 | 48 | | |||
50 | GridView { | 49 | GridView { | ||
51 | id: wallpapersGrid | 50 | id: wallpapersGrid | ||
52 | model: imageWallpaper.wallpaperModel | 51 | model: imageWallpaper.wallpaperModel | ||
53 | currentIndex: -1 | 52 | currentIndex: -1 | ||
54 | 53 | | |||
55 | 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)) | ||
56 | cellHeight: cellWidth / (imageWallpaper.width / imageWallpaper.height) | 55 | cellHeight: cellWidth / (plasmoid.width / plasmoid.height) | ||
57 | 56 | | |||
58 | anchors.margins: 4 | 57 | anchors.margins: 4 | ||
59 | boundsBehavior: Flickable.DragAndOvershootBounds | 58 | boundsBehavior: Flickable.DragAndOvershootBounds | ||
60 | 59 | | |||
61 | delegate: WallpaperDelegate {} | 60 | delegate: WallpaperDelegate {} | ||
62 | 61 | | |||
63 | onCountChanged: { | 62 | onCountChanged: { | ||
64 | wallpapersGrid.currentIndex = imageWallpaper.wallpaperModel.indexOf(cfg_Image); | 63 | wallpapersGrid.currentIndex = imageWallpaper.wallpaperModel.indexOf(cfg_Image); | ||
Show All 25 Lines |