]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.cpp
Fix fa0f142e (plain quotes fix).
[lyx.git] / src / BufferView.cpp
index a6ae1d40a3ff235c7cc23048e8f6fa6cf1d97796..77ab989d193962f602d96435b8c0fbc1f41e0128 100644 (file)
@@ -351,8 +351,8 @@ BufferView::~BufferView()
 
 int BufferView::rightMargin() const
 {
-       // The value used to be hardcoded to 10, which is 2.5mm at 100dpi
-       int const default_margin = Length(2.5, Length::MM).inPixels(0);
+       // The value used to be hardcoded to 10, which is 0.1in at 100dpi
+       int const default_margin = Length(0.1, Length::IN).inPixels(0);
        // The additional test for the case the outliner is opened.
        if (!full_screen_ || !lyxrc.full_screen_limit
            || width_ < lyxrc.full_screen_width + 2 * default_margin)
@@ -368,6 +368,13 @@ int BufferView::leftMargin() const
 }
 
 
+int BufferView::inPixels(Length const & len) const
+{
+       Font const font = buffer().params().getFont();
+       return len.inPixels(workWidth(), theFontMetrics(font).em());
+}
+
+
 bool BufferView::isTopScreen() const
 {
        return 0 == d->scrollbarParameters_.min;