Summary:
Instead of loading the model and then showing the last shown image, we can show
it early so that we signal "wallpaper.loading = false" earlier.
CCBUG: 371455
Test Plan: Have massive slideshow, login
Reviewers: davidedmundson, broulik, #plasma
Reviewed By: davidedmundson, #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D27084
Summary:
now look and feel packages can specify a default image wallpaper.
when a new containment is created at first plasma start or at activity creation
search for a default wallpaper inthe order:
look and feel package
if fails, from the plasma theme
we are sure to find a default after it as if neither of those specify one,
the wallpaper specified by the breeze plasma theme (Next) will be used
D21225 takes care of setting the wallpaper when a lnf theme is selected by the kcm
Test Plan:
tested to start plasma with an empty config file with different themes
that do or don't include wallpapers
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: kossebau, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D21226
Summary:
now look and feel packages can specify a default image wallpaper.
when a new containment is created at first plasma start or at activity creation
search for a default wallpaper inthe order:
look and feel package
if fails, from the plasma theme
we are sure to find a default after it as if neither of those specify one,
the wallpaper specified by the breeze plasma theme (Next) will be used
D21225 takes care of setting the wallpaper when a lnf theme is selected by the kcm
Test Plan:
tested to start plasma with an empty config file with different themes
that do or don't include wallpapers
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: kossebau, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D21226
Summary:
- Correct the destination path when downloading images.
- Switch from FileCopyJob to CopyJob to allow showing file overwrite dialog.
BUG: 379469
Test Plan: Drop files from Firefox to the desktop to set the wallpaper successfully.
Reviewers: #plasma, mart, ngraham
Reviewed By: #plasma, mart, ngraham
Subscribers: mart, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D26525
Summary:
BUG: 415461
FIXED-IN: 5.18.0
Depends on D26510
Right now when you first change the wallpaper plugin to slideshow, no locations are
pre-configured, so you have to add one yourself. This patch adds a
`preferred:wallpaperlocations` token as the default that gets replaced in the user's
config file at runtime with the XDG wallpaper locations.
Test Plan:
Log in as new user > right-click desktop > configure > change to slideshow wallpaper
See that`/usr/share/wallpapers` is already in the list of wallpaper locations; how nice
Reviewers: #plasma, #vdg, ndavis, davidedmundson
Reviewed By: #plasma, #vdg, ndavis, davidedmundson
Subscribers: davidre, broulik, davidedmundson, ndavis, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D26483
Summary:
This switches the image plugin to using KNewStuffQuick instead of
launching the widget dialog through that ol' widget dialog hack.
It further uses the big preview mode by default, which just seems
to make a lot of sense for wallpapers.
Test Plan:
Without: Uses the old dialog
With: Uses the new dialog, as seen below
{F7882885}
Reviewers: mart, #plasma, ngraham
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D26665
Summary:
QSortFilterProxyModel uses std::stable_sort internally which requires that the
comparison function generates a strict weak ordering. Returning true or false
randomly didn't fullfil this requirement causing a crash in some calls to invalidate.
To keep the random order consistent a vector of row indices is used which records
the current random order.
BUG: 413018
FIXED-IN: 5.17.1
Test Plan:
To reproduce the bug use a slideshow in random order with few pictures and a small
time intervall.
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: davidedmundson, broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D24723
Summary:
Allows setting of other sorting orders like alphabetical or last modified date.
To enable this a new ProxyModel is introduced which handles the sorting and
filtering (as indicated by the checkboxes). This is backed by the slideshowModel
whcih previously as only used for the configutation. The lists of slides and unseen
slides are dropped as now the slides that are shown are taken from the model.
FEATURE: 186181
FIXED-IN: 5.17.0
Test Plan:
{F6938259}
{F6938260}
{F6938261}
{F6938263}
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, msdobrescu, ngraham, filipf, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D22121
Summary:
This allows to exlude single images from the slideshow by unchecking the little checkbox in the top right corner.
Feature or todo?: If a folder is removed I don't touch the unchecked Slides. So the list could get very big but if a formerly removed folder is
added again an excluded image will be excluded again.
Test Plan:
{F6684113}
- Uncheck some images
- They don't appear in the slideshow
Reviewers: #plasma, #vdg, ngraham, davidedmundson
Reviewed By: #plasma, #vdg, ngraham, davidedmundson
Subscribers: davidedmundson, filipf, abetts, ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D19687
Summary:
This shows all the pictures inside the folders added to the Folders list. I also tried to make single pictures excludable via a checkbox on the thumbnail. This is the first time for me programming with QT/QML/Singals-Slots and I tried to use as much existing code as possible. The thumbnail view is the same as for single images and I simply subclassed the listmodel. However even if I tried to do everything like the code for slidePaths it doesn't work correctly. The checking/unchecking of images only applies on restart of plasmashell. Maybe it's a single mistake that is easily spotted by a more experienced programmer otherwise if the thumbnail view is accepted I can also revert all the checkbox stuff.
FEATURE: 403703
FIXED-IN: 5.16.0
{F6595564}
Reviewers: #vdg, ngraham, davidedmundson
Reviewed By: #vdg, ngraham, davidedmundson
Subscribers: filipf, mart, alexde, davidedmundson, ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D18809
Summary:
BUG: 402223
FIXED-IN: 5.15.0
Test Plan: Added multiple images from the file dialog. They all showed up in the wallpaper grid.
Reviewers: #konsole, broulik, davidedmundson
Reviewed By: davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D17815
Wait for m_ready until doing anything. This keeps the slideshow from first showing the default wallpaper,
then a random slideshow image, and then fade to the next slideshow image.
Differential Revision: https://phabricator.kde.org/D9763
Summary: And remove some useless debug statements as well
Test Plan: no more useless debug statment
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D4529
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
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:
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
Update the targetSize when it changes to ensure we update the image when
resolution changes. Also, since the view has an initial size of 1024x768, it would
just load that image and never use the full resolution leaving you with an ugly
blurry image. Additionally, don't bother looking up the image until everything has
settled, potentially improving startup performance slightly by saving a bit of IO.
REVIEW: 124311