]> git.lyx.org Git - features.git/commitdiff
More sensible default margins for fullscreen mode.
authorAbdelrazak Younes <younes@lyx.org>
Sun, 10 Feb 2008 10:01:16 +0000 (10:01 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sun, 10 Feb 2008 10:01:16 +0000 (10:01 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22913 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.cpp

index d05a064d227b0297fdde37b8e7d19fd66832eba4..148b3e77860365d9e5a1a9ee63cf93ee0294be6c 100644 (file)
@@ -286,16 +286,21 @@ BufferView::~BufferView()
        delete d;
 }
 
+// Put this user variable in lyxrc or pass it through setFullScreen()
+static int const max_row_width = 700;
 
 int BufferView::rightMargin() const
 {
-       return full_screen_? width_ / 4 : 10;
+       if (!full_screen_ || width_ < max_row_width + 20)
+               return 10;
+
+       return (width_ - max_row_width) / 2;
 }
 
 
 int BufferView::leftMargin() const
 {
-       return full_screen_? width_ / 4 : 10;
+       return rightMargin();
 }