mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-11-15 10:05:47 +08:00
Merge branch 'master' into modernize_appveyor_yml
This commit is contained in:
commit
35af24a9c9
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user