mirror of
https://github.com/leozide/leocad.git
synced 2026-10-26 22:10:32 +00:00
Fix thumbnail badge scaling on Retina displays
Synth and train track badges were drawn at a fixed pixel size before thumbnail downsampling, making them appear smaller on high-DPI displays. Scale badge painting by the thumbnail device pixel ratio and enable smooth image transforms to preserve the apparent badge size across display scales.
This commit is contained in:
1 parent
bc3d0f66bd
commit
92911e42e0
1 file changed
+2
@@ -436,6 +436,8 @@ void lcThumbnailManager::DrawThumbnail(lcPartThumbnailId ThumbnailId, lcPartThum
|
||||
ImageBits += Icon.bytesPerLine();
|
||||
}
|
||||
|
||||
Painter.setRenderHint(QPainter::SmoothPixmapTransform);
|
||||
Painter.scale(Thumbnail.DeviceScale, Thumbnail.DeviceScale);
|
||||
Painter.drawImage(QPoint(0, 0), Icon);
|
||||
Painter.end();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user