Commit 067a6c75 authored by Bharadwaj Raju's avatar 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
......@@ -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 plasmoid !== "undefined") {
screenWidth = plasmoid.width;
if (typeof Plasmoid !== "undefined") {
screenWidth = Plasmoid.width;
} else {
screenWidth = Screen.width;
}
......@@ -76,8 +71,8 @@ Item {
}
view.implicitCellHeight: {
let screenHeight = 0;
if (typeof plasmoid !== "undefined") {
screenHeight = plasmoid.height;
if (typeof Plasmoid !== "undefined") {
screenHeight = Plasmoid.height;
} else {
screenHeight = Screen.height;
}
......
......@@ -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 plasmoid !== "undefined") {
return Qt.size(plasmoid.width * Screen.devicePixelRatio, plasmoid.height * Screen.devicePixelRatio)
if (typeof Plasmoid !== "undefined") {
return Qt.size(Plasmoid.width * Screen.devicePixelRatio, Plasmoid.height * Screen.devicePixelRatio)
}
// Lock screen configuration case
return Qt.size(Screen.width * Screen.devicePixelRatio, Screen.height * Screen.devicePixelRatio)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment