From: Stephan Witt Date: Sat, 18 Oct 2014 13:52:43 +0000 (+0200) Subject: #9130 Text in main work area isn't rendered with high resolution X-Git-Tag: 2.2.0alpha1~1628 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=2dfb45f91b04e208fa40de03142d7b13e1149faa;p=features.git #9130 Text in main work area isn't rendered with high resolution Assign the pixelRatio of the application to the buffer of the work area. --- diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 732c8430c8..039720cdae 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -2808,6 +2808,7 @@ void GuiDocument::applyView() bp_.html_be_strict = outputModule->strictCB->isChecked(); bp_.html_css_as_file = outputModule->cssCB->isChecked(); bp_.html_math_img_scale = outputModule->mathimgSB->value(); + bp_.display_pixel_ratio = theGuiApp()->pixelRatio(); // fonts bp_.fonts_roman = diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index fbc2eca088..185eba06ce 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -262,6 +262,7 @@ GuiWorkArea::GuiWorkArea(Buffer & buffer, GuiView & gv) : d(new Private(this)) { setGuiView(gv); + buffer.params().display_pixel_ratio = theGuiApp()->pixelRatio(); setBuffer(buffer); init(); } @@ -269,7 +270,7 @@ GuiWorkArea::GuiWorkArea(Buffer & buffer, GuiView & gv) double GuiWorkArea::pixelRatio() const { -#if QT_VERSION > 0x050000 +#if QT_VERSION >= 0x050000 return devicePixelRatio(); #else return 1.0;