2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Fix pattern wallpapers with themes.

This commit is contained in:
John Preston
2019-01-29 13:57:29 +03:00
parent df0fe0a460
commit fd8e9dad92
5 changed files with 80 additions and 65 deletions

View File

@@ -4076,16 +4076,16 @@ bool readBackground() {
|| Data::IsDefaultWallPaper(*paper)) {
_backgroundCanWrite = false;
if (isOldEmptyImage || bg.version < 8005) {
Window::Theme::Background()->setImage(Data::DefaultWallPaper());
Window::Theme::Background()->set(Data::DefaultWallPaper());
Window::Theme::Background()->setTile(false);
} else {
Window::Theme::Background()->setImage(*paper);
Window::Theme::Background()->set(*paper);
}
_backgroundCanWrite = true;
return true;
} else if (Data::IsThemeWallPaper(*paper) && imageData.isEmpty()) {
_backgroundCanWrite = false;
Window::Theme::Background()->setImage(*paper);
Window::Theme::Background()->set(*paper);
_backgroundCanWrite = true;
return true;
}
@@ -4132,9 +4132,9 @@ bool readBackground() {
image = QImage();
}
}
if (!image.isNull()|| paper->backgroundColor()) {
if (!image.isNull() || paper->backgroundColor()) {
_backgroundCanWrite = false;
Window::Theme::Background()->setImage(*paper, std::move(image));
Window::Theme::Background()->set(*paper, std::move(image));
_backgroundCanWrite = true;
return true;
}