mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 11:52:25 +00:00
Fix ScrollBarAsNeeded
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25338 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2a1b0968cb
commit
c75ff524bf
@ -314,7 +314,7 @@ GuiWorkArea::~GuiWorkArea()
|
|||||||
void GuiWorkArea::fixVerticalScrollBar()
|
void GuiWorkArea::fixVerticalScrollBar()
|
||||||
{
|
{
|
||||||
if (!isFullScreen())
|
if (!isFullScreen())
|
||||||
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -569,13 +569,13 @@ void GuiWorkArea::toggleCursor()
|
|||||||
void GuiWorkArea::updateScrollbar()
|
void GuiWorkArea::updateScrollbar()
|
||||||
{
|
{
|
||||||
ScrollbarParameters const & scroll_ = buffer_view_->scrollbarParameters();
|
ScrollbarParameters const & scroll_ = buffer_view_->scrollbarParameters();
|
||||||
|
// WARNING: don't touch at the scrollbar value like this:
|
||||||
// Block the scrollbar signal to prevent recursive signal/slot calling.
|
// verticalScrollBar()->setValue(scroll_.position);
|
||||||
verticalScrollBar()->blockSignals(true);
|
// because this would cause a recursive signal/slot calling with
|
||||||
|
// GuiWorkArea::scrollTo
|
||||||
verticalScrollBar()->setRange(scroll_.min, scroll_.max);
|
verticalScrollBar()->setRange(scroll_.min, scroll_.max);
|
||||||
verticalScrollBar()->setPageStep(scroll_.page_step);
|
verticalScrollBar()->setPageStep(scroll_.page_step);
|
||||||
verticalScrollBar()->setSingleStep(scroll_.single_step);
|
verticalScrollBar()->setSingleStep(scroll_.single_step);
|
||||||
verticalScrollBar()->setValue(scroll_.position);
|
|
||||||
verticalScrollBar()->setSliderPosition(scroll_.position);
|
verticalScrollBar()->setSliderPosition(scroll_.position);
|
||||||
verticalScrollBar()->blockSignals(false);
|
verticalScrollBar()->blockSignals(false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user