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

Allow to blur wallpapers from file.

This commit is contained in:
John Preston
2019-02-08 16:43:31 +03:00
parent e2f0886950
commit 890aacaeee
5 changed files with 42 additions and 37 deletions

View File

@@ -511,9 +511,6 @@ void BackgroundPreviewBox::paintEvent(QPaintEvent *e) {
void BackgroundPreviewBox::paintImage(Painter &p, TimeMs ms) {
Expects(!_scaled.isNull());
if (_paper.isPattern() && _paper.document() && _full.isNull()) {
return;
}
const auto master = _paper.isPattern()
? std::clamp(_paper.patternIntensity() / 100., 0., 1.)
: 1.;
@@ -695,7 +692,8 @@ std::optional<QColor> BackgroundPreviewBox::patternBackgroundColor() const {
void BackgroundPreviewBox::checkLoadedDocument() {
const auto document = _paper.document();
if (!document
if (!_full.isNull()
|| !document
|| !document->loaded(DocumentData::FilePathResolveChecked)
|| _generating) {
return;