2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 00:55:12 +00:00

Generate static complex gradients.

This commit is contained in:
John Preston
2021-08-16 13:24:15 +03:00
parent 689378ee04
commit a1f81e4de8
4 changed files with 22 additions and 80 deletions

View File

@@ -138,9 +138,9 @@ void SectionWidget::PaintBackground(
cache.pixmap);
}
};
const auto goodNow = !state.now.pixmap.isNull()
&& (state.now.area == fill);
const auto useCache = goodNow || !gradient.isNull();
const auto hasNow = !state.now.pixmap.isNull();
const auto goodNow = hasNow && (state.now.area == fill);
const auto useCache = goodNow || (hasNow && !gradient.isNull());
if (useCache) {
if (state.shown < 1. && !gradient.isNull()) {
paintCache(state.was);