cache whether or not the wallaper is actually a full package (dir + metadata) and on render hints changing just look for the best paper if we are a full package; preserves rendering for single image papers in the wallpaper config
BUG:212930 svn path=/trunk/KDE/kdelibs/; revision=1044424
This commit is contained in:
parent
1b945b8aff
commit
16b5fcc766
@ -174,7 +174,8 @@ ThemePackage::ThemePackage(QObject *parent)
|
||||
|
||||
WallpaperPackage::WallpaperPackage(Wallpaper *paper, QObject *parent)
|
||||
: PackageStructure(parent, "Background"),
|
||||
m_paper(paper)
|
||||
m_paper(paper),
|
||||
m_fullPackage(true)
|
||||
{
|
||||
QStringList mimetypes;
|
||||
mimetypes << "image/svg" << "image/png" << "image/jpeg" << "image/jpg";
|
||||
@ -193,7 +194,9 @@ WallpaperPackage::WallpaperPackage(Wallpaper *paper, QObject *parent)
|
||||
|
||||
void WallpaperPackage::renderHintsChanged()
|
||||
{
|
||||
pathChanged();
|
||||
if (m_fullPackage) {
|
||||
findBestPaper();
|
||||
}
|
||||
}
|
||||
|
||||
void WallpaperPackage::pathChanged()
|
||||
@ -208,7 +211,8 @@ void WallpaperPackage::pathChanged()
|
||||
|
||||
QFileInfo info(path());
|
||||
|
||||
if (info.isDir()) {
|
||||
m_fullPackage = info.isDir();
|
||||
if (m_fullPackage) {
|
||||
setContentsPrefix("contents/");
|
||||
findBestPaper();
|
||||
} else {
|
||||
|
@ -80,6 +80,7 @@ private Q_SLOTS:
|
||||
|
||||
private:
|
||||
Wallpaper *m_paper;
|
||||
bool m_fullPackage;
|
||||
};
|
||||
|
||||
class ContainmentActionsPackage : public PackageStructure
|
||||
|
Loading…
x
Reference in New Issue
Block a user