From: Stephan Witt Date: Sat, 18 Oct 2014 13:48:18 +0000 (+0200) Subject: #9130 Text in main work area isn't rendered with high resolution X-Git-Tag: 2.2.0alpha1~1630 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=54a742382cb3cbccd7ce0bc4c447074c9bbbbf53;p=features.git #9130 Text in main work area isn't rendered with high resolution Make QT_VERSION check for Qt5 matching Qt5.0.0 too. --- diff --git a/src/frontends/qt4/GuiPainter.cpp b/src/frontends/qt4/GuiPainter.cpp index 986ac4672a..0071581a63 100644 --- a/src/frontends/qt4/GuiPainter.cpp +++ b/src/frontends/qt4/GuiPainter.cpp @@ -371,7 +371,7 @@ int GuiPainter::text(int x, int y, docstring const & s, int const h = mA + mD; if (w > 0 && h > 0) { pm = QPixmap(pixelRatio() * w , pixelRatio() * h); -#if QT_VERSION > 0x050000 +#if QT_VERSION >= 0x050000 pm.setDevicePixelRatio(pixelRatio()); #endif pm.fill(Qt::transparent); diff --git a/src/frontends/qt4/GuiWorkArea_Private.h b/src/frontends/qt4/GuiWorkArea_Private.h index 0915b64d4c..cdf054bc91 100644 --- a/src/frontends/qt4/GuiWorkArea_Private.h +++ b/src/frontends/qt4/GuiWorkArea_Private.h @@ -128,14 +128,14 @@ struct GuiWorkArea::Private if (lyxrc.use_qimage) { QImage *x = new QImage(pixel_ratio_ * p->viewport()->width(), pixel_ratio_ * p->viewport()->height(), QImage::Format_ARGB32_Premultiplied); -#if QT_VERSION > 0x050000 +#if QT_VERSION >= 0x050000 x->setDevicePixelRatio(pixel_ratio_); #endif screen_ = x; } else { QPixmap *x = new QPixmap(pixel_ratio_ * p->viewport()->width(), pixel_ratio_ * p->viewport()->height()); -#if QT_VERSION > 0x050000 +#if QT_VERSION >= 0x050000 x->setDevicePixelRatio(pixel_ratio_); #endif screen_ = x;