More sensible default margins for fullscreen mode.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22913 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-02-10 10:01:16 +00:00
parent 9bd8ffb29c
commit 288b939274

View File

@ -286,16 +286,21 @@ BufferView::~BufferView()
delete d; delete d;
} }
// Put this user variable in lyxrc or pass it through setFullScreen()
static int const max_row_width = 700;
int BufferView::rightMargin() const 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 int BufferView::leftMargin() const
{ {
return full_screen_? width_ / 4 : 10; return rightMargin();
} }