Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Workspace
Commits
18069a0f
Commit
18069a0f
authored
May 31, 2022
by
Fushan Wen
Committed by
Nate Graham
Jun 02, 2022
Browse files
wallpapers/image: click image to preview
FEATURE: 403384
FIXED-IN: 5.26
parent
e2244b63
Pipeline
#184554
passed with stage
in 8 minutes and 21 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
wallpapers/image/imagepackage/contents/config/main.xml
View file @
18069a0f
...
...
@@ -22,6 +22,10 @@
<label>
Wallpaper image path or wallpaper name
</label>
<default></default>
</entry>
<entry
name=
"PreviewImage"
type=
"String"
>
<label>
Wallpaper preview image path
</label>
<default>
null
</default>
</entry>
<entry
name=
"FillMode"
type=
"int"
>
<label>
Sizing, cropping and positioning of the wallpaper image
</label>
<default>
2
</default>
...
...
wallpapers/image/imagepackage/contents/ui/WallpaperDelegate.qml
View file @
18069a0f
...
...
@@ -119,6 +119,7 @@ KCM.GridDelegate {
onClicked
:
{
if
(
configDialog
.
currentWallpaper
==
"
org.kde.image
"
)
{
cfg_Image
=
model
.
packageName
||
model
.
path
;
wallpaper
.
configuration
.
PreviewImage
=
cfg_Image
;
}
GridView
.
currentIndex
=
index
;
}
...
...
wallpapers/image/imagepackage/contents/ui/config.qml
View file @
18069a0f
...
...
@@ -208,4 +208,8 @@ ColumnLayout {
viewMode
:
NewStuff
.
Page
.
ViewMode
.
Preview
}
}
Component.onDestruction
:
{
wallpaper
.
configuration
.
PreviewImage
=
"
null
"
;
}
}
wallpapers/image/imagepackage/contents/ui/main.qml
View file @
18069a0f
...
...
@@ -53,6 +53,8 @@ QQC2.StackView {
//private
Component.onCompleted
:
{
// In case plasmashell crashes when the config dialog is opened
wallpaper
.
configuration
.
PreviewImage
=
"
null
"
;
wallpaper
.
loading
=
true
;
// delays ksplash until the wallpaper has been loaded
if
(
wallpaper
.
pluginName
===
"
org.kde.slideshow
"
)
{
...
...
@@ -66,7 +68,15 @@ QQC2.StackView {
usedInConfig
:
false
//the oneliner of difference between image and slideshow wallpapers
renderingMode
:
(
wallpaper
.
pluginName
===
"
org.kde.image
"
)
?
Wallpaper
.
ImageBackend
.
SingleImage
:
Wallpaper
.
ImageBackend
.
SlideShow
image
:
wallpaper
.
pluginName
===
"
org.kde.image
"
?
wallpaper
.
configuration
.
Image
:
""
image
:
{
if
(
wallpaper
.
pluginName
!==
"
org.kde.image
"
)
{
return
""
;
}
if
(
wallpaper
.
configuration
.
PreviewImage
!==
"
null
"
)
{
return
wallpaper
.
configuration
.
PreviewImage
;
}
return
wallpaper
.
configuration
.
Image
;
}
targetSize
:
root
.
sourceSize
slidePaths
:
wallpaper
.
configuration
.
SlidePaths
slideTimer
:
wallpaper
.
configuration
.
SlideInterval
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment