Fixed display of widget for point details on charts on retina.

This commit is contained in:
23rd 2023-10-12 17:06:32 +03:00
parent b9fa14139a
commit 01c2ade501

View file

@ -162,6 +162,7 @@ PointDetailsWidget::PointDetailsWidget(
_arrow = QImage( _arrow = QImage(
QSize(w + stroke, w * 2 + stroke) * style::DevicePixelRatio(), QSize(w + stroke, w * 2 + stroke) * style::DevicePixelRatio(),
QImage::Format_ARGB32_Premultiplied); QImage::Format_ARGB32_Premultiplied);
_arrow.setDevicePixelRatio(style::DevicePixelRatio());
_arrow.fill(Qt::transparent); _arrow.fill(Qt::transparent);
{ {
auto p = QPainter(&_arrow); auto p = QPainter(&_arrow);
@ -366,6 +367,7 @@ void PointDetailsWidget::paintEvent(QPaintEvent *e) {
_cache = QImage( _cache = QImage(
size() * style::DevicePixelRatio(), size() * style::DevicePixelRatio(),
QImage::Format_ARGB32_Premultiplied); QImage::Format_ARGB32_Premultiplied);
_cache.setDevicePixelRatio(style::DevicePixelRatio());
_cache.fill(Qt::transparent); _cache.fill(Qt::transparent);
auto p = QPainter(&_cache); auto p = QPainter(&_cache);