scrollbars always on to avoid an additional resize when switching the buffer

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15815 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2006-11-09 09:15:04 +00:00
parent e70fa92179
commit d1280565fd

View File

@ -193,7 +193,7 @@ GuiWorkArea::GuiWorkArea(int w, int h, int id, LyXView & lyx_view)
cursor_ = new frontend::CursorWidget(this);
cursor_->hide();
setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setAcceptDrops(true);
setMinimumSize(100, 70);
@ -252,7 +252,7 @@ void GuiWorkArea::setScrollbarParams(int h, int scroll_pos, int scroll_line_step
h += height() / 4;
int scroll_max_ = std::max(0, h - height());
setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
verticalScrollBar()->setRange(0, scroll_max_);
verticalScrollBar()->setSliderPosition(scroll_pos);
verticalScrollBar()->setSingleStep(scroll_line_step);