From 2dfb45f91b04e208fa40de03142d7b13e1149faa Mon Sep 17 00:00:00 2001 From: Stephan Witt Date: Sat, 18 Oct 2014 15:52:43 +0200 Subject: [PATCH] #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. --- src/frontends/qt4/GuiDocument.cpp | 1 + src/frontends/qt4/GuiWorkArea.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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; -- 2.39.5