Changeset View
Changeset View
Standalone View
Standalone View
wallpapers/image/imagepackage/contents/ui/WallpaperDelegate.qml
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | 42 | actions: [ | |||
---|---|---|---|---|---|
53 | }, | 53 | }, | ||
54 | Kirigami.Action { | 54 | Kirigami.Action { | ||
55 | icon.name: "edit-delete" | 55 | icon.name: "edit-delete" | ||
56 | tooltip: i18nd("plasma_wallpaper_org.kde.image", "Remove Wallpaper") | 56 | tooltip: i18nd("plasma_wallpaper_org.kde.image", "Remove Wallpaper") | ||
57 | visible: model.removable && !model.pendingDeletion && configDialog.currentWallpaper == "org.kde.image" | 57 | visible: model.removable && !model.pendingDeletion && configDialog.currentWallpaper == "org.kde.image" | ||
58 | onTriggered: { | 58 | onTriggered: { | ||
59 | imageModel.setPendingDeletion(index, true); | 59 | imageModel.setPendingDeletion(index, true); | ||
60 | if (wallpapersGrid.currentIndex === index) { | 60 | if (wallpapersGrid.currentIndex === index) { | ||
61 | wallpapersGrid.currentIndex = (index + 1) % wallpapersGrid.count; | 61 | wallpapersGrid.currentIndex = (index + 1) % wallpapersGrid.rowCount(); | ||
62 | } | 62 | } | ||
63 | } | 63 | } | ||
64 | } | 64 | } | ||
65 | ] | 65 | ] | ||
66 | 66 | | |||
67 | thumbnail: Rectangle { | 67 | thumbnail: Rectangle { | ||
68 | id: backgroundRect | 68 | id: backgroundRect | ||
69 | color: cfg_Color | 69 | color: cfg_Color | ||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | 119 | QtControls2.CheckBox { | |||
121 | anchors.right: parent.right | 121 | anchors.right: parent.right | ||
122 | anchors.top: parent.top | 122 | anchors.top: parent.top | ||
123 | checked: visible ? model.checked : false | 123 | checked: visible ? model.checked : false | ||
124 | onToggled: imageWallpaper.toggleSlide(model.path, checked) | 124 | onToggled: imageWallpaper.toggleSlide(model.path, checked) | ||
125 | } | 125 | } | ||
126 | } | 126 | } | ||
127 | 127 | | |||
128 | onClicked: { | 128 | onClicked: { | ||
129 | if (configDialog.currentWallpaper == "org.kde.image") { | ||||
129 | cfg_Image = model.path; | 130 | cfg_Image = model.path; | ||
130 | wallpapersGrid.forceActiveFocus(); | 131 | } | ||
132 | view.currentIndex = index; | ||||
131 | } | 133 | } | ||
132 | } | 134 | } |