mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
More scrolling tweaks.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22233 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
4fe31abd06
commit
7280d67126
@ -427,9 +427,9 @@ void BufferView::updateScrollbar()
|
|||||||
int const parsize = int(t.paragraphs().size());
|
int const parsize = int(t.paragraphs().size());
|
||||||
if (d->par_height_.size() != parsize) {
|
if (d->par_height_.size() != parsize) {
|
||||||
d->par_height_.clear();
|
d->par_height_.clear();
|
||||||
// FIXME: We assume a default paragraph height of 4 rows. This
|
// FIXME: We assume a default paragraph height of 2 rows. This
|
||||||
// should probably be pondered with the screen width.
|
// should probably be pondered with the screen width.
|
||||||
d->par_height_.resize(parsize, defaultRowHeight() * 4);
|
d->par_height_.resize(parsize, defaultRowHeight() * 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// It would be better to fix the scrollbar to understand
|
// It would be better to fix the scrollbar to understand
|
||||||
@ -483,8 +483,8 @@ ScrollbarParameters const & BufferView::scrollbarParameters() const
|
|||||||
void BufferView::scrollDocView(int value)
|
void BufferView::scrollDocView(int value)
|
||||||
{
|
{
|
||||||
int const offset = value - d->scrollbarParameters_.position;
|
int const offset = value - d->scrollbarParameters_.position;
|
||||||
//TextMetrics & tm = d->text_metrics_[&buffer_.text()];
|
// If the offset is less than 2 screen height, prefer to scroll instead.
|
||||||
if (abs(offset) <= 3*height_) {
|
if (abs(offset) <= 2 * height_) {
|
||||||
scroll(offset);
|
scroll(offset);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user