From 288b939274cd9a84ff31bfbeac797339c8bca521 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Sun, 10 Feb 2008 10:01:16 +0000 Subject: [PATCH] More sensible default margins for fullscreen mode. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22913 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index d05a064d22..148b3e7786 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -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(); }