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
067a6c75
Commit
067a6c75
authored
Oct 09, 2022
by
Bharadwaj Raju
Browse files
Revert "wallpapers/image: Fix when used outside plasmashell"
This reverts commit
cf061bab
parent
cf061bab
Pipeline
#244554
passed with stage
in 8 minutes and 13 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
wallpapers/image/imagepackage/contents/ui/ThumbnailsComponent.qml
View file @
067a6c75
...
...
@@ -19,11 +19,6 @@ Item {
property
alias
view
:
wallpapersGrid
.
view
// HACK: detect an invalid Plasmoid attached property
// this is needed when we run outside of a Plasmashell context like in the KScreenLocker KCM
// otherwise the invalid Plasmoid is an empty `object` and not actually `undefined`
property
var
plasmoid
:
Plasmoid
.
width
===
undefined
?
undefined
:
Plasmoid
readonly
property
var
imageModel
:
(
configDialog
.
currentWallpaper
===
"
org.kde.image
"
)
?
imageWallpaper
.
wallpaperModel
:
imageWallpaper
.
slideFilterModel
Connections
{
...
...
@@ -66,8 +61,8 @@ Item {
//set the size of the cell, depending on Screen resolution to respect the aspect ratio
view.implicitCellWidth
:
{
let
screenWidth
=
0
;
if
(
typeof
p
lasmoid
!==
"
undefined
"
)
{
screenWidth
=
p
lasmoid
.
width
;
if
(
typeof
P
lasmoid
!==
"
undefined
"
)
{
screenWidth
=
P
lasmoid
.
width
;
}
else
{
screenWidth
=
Screen
.
width
;
}
...
...
@@ -76,8 +71,8 @@ Item {
}
view.implicitCellHeight
:
{
let
screenHeight
=
0
;
if
(
typeof
p
lasmoid
!==
"
undefined
"
)
{
screenHeight
=
p
lasmoid
.
height
;
if
(
typeof
P
lasmoid
!==
"
undefined
"
)
{
screenHeight
=
P
lasmoid
.
height
;
}
else
{
screenHeight
=
Screen
.
height
;
}
...
...
wallpapers/image/imagepackage/contents/ui/config.qml
View file @
067a6c75
...
...
@@ -39,11 +39,6 @@ ColumnLayout {
property
var
cfg_UncheckedSlides
:
[]
property
var
cfg_UncheckedSlidesDefault
:
[]
// HACK: detect an invalid Plasmoid attached property
// this is needed when we run outside of a Plasmashell context like in the KScreenLocker KCM
// otherwise the invalid Plasmoid is an empty `object` and not actually `undefined`
property
var
plasmoid
:
Plasmoid
.
width
===
undefined
?
undefined
:
Plasmoid
signal
configurationChanged
()
function
saveConfig
()
{
...
...
@@ -57,8 +52,8 @@ ColumnLayout {
id
:
imageWallpaper
renderingMode
:
(
configDialog
.
currentWallpaper
===
"
org.kde.image
"
)
?
PlasmaWallpaper
.
ImageBackend
.
SingleImage
:
PlasmaWallpaper
.
ImageBackend
.
SlideShow
targetSize
:
{
if
(
typeof
p
lasmoid
!==
"
undefined
"
)
{
return
Qt
.
size
(
p
lasmoid
.
width
*
Screen
.
devicePixelRatio
,
p
lasmoid
.
height
*
Screen
.
devicePixelRatio
)
if
(
typeof
P
lasmoid
!==
"
undefined
"
)
{
return
Qt
.
size
(
P
lasmoid
.
width
*
Screen
.
devicePixelRatio
,
P
lasmoid
.
height
*
Screen
.
devicePixelRatio
)
}
// Lock screen configuration case
return
Qt
.
size
(
Screen
.
width
*
Screen
.
devicePixelRatio
,
Screen
.
height
*
Screen
.
devicePixelRatio
)
...
...
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