]> git.lyx.org Git - lyx.git/commitdiff
#9130 Text in main work area isn't rendered with high resolution
authorStephan Witt <switt@lyx.org>
Sat, 18 Oct 2014 13:52:43 +0000 (15:52 +0200)
committerStephan Witt <switt@lyx.org>
Sat, 18 Oct 2014 13:52:43 +0000 (15:52 +0200)
Assign the pixelRatio of the application to the buffer of the work area.

src/frontends/qt4/GuiDocument.cpp
src/frontends/qt4/GuiWorkArea.cpp

index 732c8430c85e2732b7d980f6de8343830e6219f1..039720cdaefee5d7eaa6d2bc2cc00a5bb471d2ef 100644 (file)
@@ -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 =
index fbc2eca088e9c44d125c4fac203ada58d488356c..185eba06ce4bb3785bd796140e057be6b783dbe9 100644 (file)
@@ -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;