Merge branch 'master' into modernize_appveyor_yml

This commit is contained in:
Jan W. Krieger 2022-04-17 23:32:50 +02:00 committed by GitHub
commit 35af24a9c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1236,8 +1236,9 @@ void JKQTPlotter::resizeEvent(QResizeEvent *event) {
void JKQTPlotter::delayedResizeEvent()
{
int plotImageWidth=width();
int plotImageHeight=height();
qreal dpr = devicePixelRatioF();
int plotImageWidth=width() * dpr;
int plotImageHeight=height() * dpr;
plotImageHeight=plotImageHeight-getPlotYOffset();
//qDebug()<<"resize: "<<plotImageWidth<<" x "<<plotImageHeight<<std::endl;
@ -1245,6 +1246,8 @@ void JKQTPlotter::delayedResizeEvent()
if (plotImageWidth != image.width() || plotImageHeight != image.height()) {
QImage newImage(QSize(plotImageWidth, plotImageHeight), QImage::Format_ARGB32);
newImage.setDevicePixelRatio(dpr);
image=newImage;
sizeChanged=true;
}