Fixed cache of graphs in chart widgets on retina.

This commit is contained in:
23rd
2025-12-16 11:46:36 +03:00
parent 4c545181ad
commit 5c1604fc53
5 changed files with 13 additions and 0 deletions

View File

@@ -1560,4 +1560,12 @@ rpl::producer<float64> ChartWidget::zoomRequests() {
return _zoomRequests.events();
}
void FixCacheForHighDPIChartWidget(not_null<Ui::RpWidget*> container) {
if (style::DevicePixelRatio() != 1) {
container->paintRequest() | rpl::take(2) | rpl::on_next([=] {
container->update();
}, container->lifetime());
}
}
} // namespace Statistic

View File

@@ -179,4 +179,6 @@ private:
};
void FixCacheForHighDPIChartWidget(not_null<Ui::RpWidget*> container);
} // namespace Statistic