Changeset View
Changeset View
Standalone View
Standalone View
wallpapers/image/imagepackage/contents/ui/main.qml
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Line(s) | 127 | if (currentImage == imageA) { | |||
---|---|---|---|---|---|
128 | currentImage = imageB | 128 | currentImage = imageB | ||
129 | otherImage = imageA | 129 | otherImage = imageA | ||
130 | } else { | 130 | } else { | ||
131 | currentImage = imageA | 131 | currentImage = imageA | ||
132 | otherImage = imageB | 132 | otherImage = imageB | ||
133 | } | 133 | } | ||
134 | } | 134 | } | ||
135 | 135 | | |||
136 | Binding { | | |||
137 | target: wallpaper.configuration | | |||
138 | property: "width" | | |||
139 | value: root.width | | |||
140 | } | | |||
141 | Binding { | | |||
142 | target: wallpaper.configuration | | |||
143 | property: "height" | | |||
144 | value: root.height | | |||
145 | } | | |||
146 | | ||||
147 | onWidthChanged: startFadeSourceTimer() | 136 | onWidthChanged: startFadeSourceTimer() | ||
148 | onHeightChanged: startFadeSourceTimer() | 137 | onHeightChanged: startFadeSourceTimer() | ||
149 | 138 | | |||
150 | Timer { | 139 | Timer { | ||
151 | id: sourceSizeTimer | 140 | id: sourceSizeTimer | ||
152 | interval: 1000 // always delay reloading the image even when animations are turned off | 141 | interval: 1000 // always delay reloading the image even when animations are turned off | ||
153 | onTriggered: fadeSourceSize() | 142 | onTriggered: fadeSourceSize() | ||
154 | } | 143 | } | ||
155 | 144 | | |||
156 | Component.onCompleted: { | 145 | Component.onCompleted: { | ||
157 | if (wallpaper.pluginName == "org.kde.slideshow") { | 146 | if (wallpaper.pluginName == "org.kde.slideshow") { | ||
158 | wallpaper.setAction("open", i18nd("plasma_applet_org.kde.image", "Open Wallpaper Image"), "document-open"); | 147 | wallpaper.setAction("open", i18nd("plasma_applet_org.kde.image", "Open Wallpaper Image"), "document-open"); | ||
159 | wallpaper.setAction("next", i18nd("plasma_applet_org.kde.image","Next Wallpaper Image"),"user-desktop"); | 148 | wallpaper.setAction("next", i18nd("plasma_applet_org.kde.image","Next Wallpaper Image"),"user-desktop"); | ||
160 | } | 149 | } | ||
161 | } | 150 | } | ||
162 | 151 | | |||
163 | Wallpaper.Image { | 152 | Wallpaper.Image { | ||
164 | id: imageWallpaper | 153 | id: imageWallpaper | ||
165 | //the oneliner of difference between image and slideshow wallpapers | 154 | //the oneliner of difference between image and slideshow wallpapers | ||
166 | renderingMode: (wallpaper.pluginName == "org.kde.image") ? Wallpaper.Image.SingleImage : Wallpaper.Image.SlideShow | 155 | renderingMode: (wallpaper.pluginName == "org.kde.image") ? Wallpaper.Image.SingleImage : Wallpaper.Image.SlideShow | ||
167 | // targetSize: "1920x1080" | 156 | targetSize: Qt.size(root.width, root.height) | ||
168 | width: root.width | | |||
169 | height: root.height | | |||
170 | slidePaths: wallpaper.configuration.SlidePaths | 157 | slidePaths: wallpaper.configuration.SlidePaths | ||
171 | slideTimer: wallpaper.configuration.SlideInterval | 158 | slideTimer: wallpaper.configuration.SlideInterval | ||
172 | } | 159 | } | ||
173 | 160 | | |||
174 | onFillModeChanged: { | 161 | onFillModeChanged: { | ||
175 | fadeFillMode(); | 162 | fadeFillMode(); | ||
176 | } | 163 | } | ||
177 | onConfiguredImageChanged: { | 164 | onConfiguredImageChanged: { | ||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |