Summary:
Using the same semantics as the InstallationCommand, makes it possible for the
client to get a kns resource adopted.
Needs further standarization, I have implemented this on Discover and seems
to work just fine.
Reviewers: whiting, leinir, #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D4307
Directly expose "targetSize" as property. The wallpaper is already initialized with
the correct size for some time now but the fact that we had two properties width and height
in there had it still do unneccessary work when it emitted "sizeChanged(2560, 0)" and
then the final "sizeChanged(2560, 1440)" afterwards.
Also, I didn't really see a point in storing the wallpaper size in its config,
it's overwritten by the wallpaper anyway and only used in the wallpaper config dialog
for the aspect ratio. We can just ask the view directly then.
BUG: 374689
FIXED-IN: 5.9.0
Differential Revision: https://phabricator.kde.org/D4001
There is no need to decode the whole image and load it into memory
when we are only interested in the dimensions.
Differential Revision: https://phabricator.kde.org/D3973
Summary:
select the correct index upon loading when the count changes.
this removes the flicker at startup and the view is at the correct
wallpaper since the first frame. Also, now when a wallpaper is
downloaded with knewstuff, the old wallpaper stays selected,
it doesn't get resetted to the first wallpaper anymore
Test Plan:
open wallpaer dialog, no more flicker
install a new wallpaper, the currently selected one stays selected
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3532
Summary:
This new version of the distance function simplifies the
findPreferredImageInPackage method by using the aspect ratio in the
calculation. Now, it won't only search for a wallpaper with the same
aspect ratio, but will also choose one with the closest possible
aspect ratio when a perfect match is not found.
Also, I separated the method that chooses the preferred image
to not use KPackage in order to use it from a test application
that tests the distance algorithm with all possible resolutions.
Test application that tests the Image::findPreferredImage method
The test initializes a list of available wallpaper image sizes,
then a list of screen resolutions, and then executes
Image::findPreferredImage to find out which is the preferred image
in each case.
Test Plan:
I tested with different screen resolutions on a virtual machine with
openSUSE Leap 42.2 RC1 and also included a commit that adds a test
application (not built by default) that tests all possible resolutions.
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: mart, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3188
Summary:
This new version of the distance function simplifies the
findPreferredImageInPackage method by using the aspect ratio in the
calculation. Now, it won't only search for a wallpaper with the same
aspect ratio, but will also choose one with the closest possible
aspect ratio when a perfect match is not found.
Also, I separated the method that chooses the preferred image
to not use KPackage in order to use it from a test application
that tests the distance algorithm with all possible resolutions.
Test application that tests the Image::findPreferredImage method
The test initializes a list of available wallpaper image sizes,
then a list of screen resolutions, and then executes
Image::findPreferredImage to find out which is the preferred image
in each case.
Test Plan:
I tested with different screen resolutions on a virtual machine with
openSUSE Leap 42.2 RC1 and also included a commit that adds a test
application (not built by default) that tests all possible resolutions.
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: mart, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3188
Summary:
Removes preferred definition so a new wallpaper is selected.
Also, just in case, check for division by 0.
When the screen resolution changes, a new wallpaper has to be chosen
but this is not happening unless we remove the preferred definition.
This depends on https://git.reviewboard.kde.org/r/129118/ to be accepted.
Test Plan:
I ran plasmashell with the default opensuse wallpaper (a green bulb)
while changing the screen resolution between 1024x768 and 1280x720.
With this and the kpackage patch above, a different background image is
selected correctly with the correct aspect ratio.
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: mart, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2981
Summary:
try to preview everything that's found in the list.
by default not all image types are enabled, like
svg, which is a supported wallpaper type
Test Plan: svg files are correctly previewed in the thumbnail grid
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3017
Summary:
try to preview everything that's found in the list.
by default not all image types are enabled, like
svg, which is a supported wallpaper type
Test Plan: svg files are correctly previewed in the thumbnail grid
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3017
Summary:
The default wallpaper method is to scale the wallpaper, and the previous
algorithm in plasma choosed the wallpaper with closest area to the screen
area (w*h) giving a bit of preference to downscaling over upscaling.
The result was that in widescreens like 1280x720, a 1280x1024 wallpaper
was preferred to be scaled down, instead of scaling down the also
available 1920x1080 wallpaper, which had the same aspect ratio and so,
was not distorted.
This patch changes the Image::findPreferedImageInPackage method to do the
same closest-area algorithm first on wallpapers with the same
aspect ratio and if no wallpaper with same aspect ratio is found, then
fallback to the previous algorithm. Note I added some variables so both
happen in the same loop and we don't have to iterate twice
over the wallpapers.
This fixes https://bugzilla.opensuse.org/show_bug.cgi?id=990257
Test Plan:
Make sure the wallpaper mode is in Scale. Choose a wallpaper with
1920x1080 and 1280x1024 resolutions which shows a perfect circle,
a recognizable object or a face. Then change the screen resolution to
1280x720. The wallpaper should appear with correct aspect ratio.
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2834
BackgroundFinder::suffixes(), despite its name, actually returns a list
of glob patterns. The extension of the image file is checked against
this list to ensure that it is supported, which needs to take
account of that. Do the check in a new function
BackgroundFinder::isAcceptableSuffix(const QString &suffix).
Reviewers: davidedmundson, #plasma
Reviewed By: davidedmundson, #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2722
Summary:
This caused it to be cropped on some translations.
This patch only sets the minimum size to force it to line up with the form layout,
but still allow the text to be larger if needed.
Also tidy up other use of directly setting width/anchors in a layout.
BUG:368487
Test Plan:
Checked English layout matched up
Changed text to "asdfasdfadsfasdfljasdfjadlf" and checked that still fit
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2729
"syspal" is referenced by the WallpaperDelegate but added by the Containment
Appearance Configuration QML which isn't there when loading the wallpaper config
into a different view like the lock screen UI.
Differential Revision: https://phabricator.kde.org/D2752
When simultaneously fading two items (one from fully opaque to transparent and the other
one vice-versa) you can briefly see the black background through the images leading to an ugly flicker.
By only doing this when the old image could be seen (when the new one has a smaller
size) we avoid this in the common case of full-size wallpapers.
Ideally, crossfading would be done using a ShaderEffect.
Differential Revision: https://phabricator.kde.org/D2484
Instead use QImageReader to get the glob patterns of all supported formats,
similar to what the "Open image" dialog in the regular image wallpaper did.
Also, make use of QDir::setNameFilters rather than manually filtering out non-matching files.
Differential Revision: https://phabricator.kde.org/D2511
Summary:
Changing the default to the color specified for the new lock screen
in the new designe (see T3364).
Test Plan: Locked the screen with the color wallpaper: it turned blue
Reviewers: #plasma, #vdg
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2353