]> git.lyx.org Git - features.git/commitdiff
Fix embarrassing thinko (fixup 1a969fa4a61)
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 26 Jan 2018 09:06:28 +0000 (10:06 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 26 Jan 2018 09:06:28 +0000 (10:06 +0100)
Now people know for sure that I sometimes forget to test that code
actually works before committing. It was so straightforward, what
could possibly go wrong?

src/BufferView.cpp

index 18f972527dcf21485c84a98694cb4a28500d202e..b64f36d8ab149549e446a9d872f1792590aabac3 100644 (file)
@@ -394,10 +394,10 @@ int BufferView::zoomedPixels(int pix) const
        // Zoom factor specified by user in percent
        double const zoom = lyxrc.currentZoom / 100.0; // [percent]
 
-       // DPI setting for monitor: pixels/inch
-       double const dpi = lyxrc.dpi; // screen resolution [pixels/inch]
+       // DPI setting for monitor relative to 100dpi
+       double const dpizoom = lyxrc.dpi / 100.0; // [per 100dpi]
 
-       return support::iround(pix * zoom * dpi);
+       return support::iround(pix * zoom * dpizoom);
 }