From a24debae6fc0f29ffe502534cb3af71d76e5bf93 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Mon, 25 Mar 2024 19:25:49 +0800 Subject: [PATCH] fix: Editor vertical scroller's page step are not correct --- libs/qsynedit/qsynedit/qsynedit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/qsynedit/qsynedit/qsynedit.cpp b/libs/qsynedit/qsynedit/qsynedit.cpp index b3d35495..4293788d 100644 --- a/libs/qsynedit/qsynedit/qsynedit.cpp +++ b/libs/qsynedit/qsynedit/qsynedit.cpp @@ -159,7 +159,7 @@ QSynEdit::QSynEdit(QWidget *parent) : QAbstractScrollArea(parent), connect(verticalScrollBar(),&QScrollBar::valueChanged, this, &QSynEdit::onScrolled); connect(verticalScrollBar(), &QAbstractSlider::sliderReleased, - this, qOverload<>(&QSynEdit::ensureLineAlignedWithTop)); + this, &QSynEdit::ensureLineAlignedWithTop); //enable input method setAttribute(Qt::WA_InputMethodEnabled); @@ -3125,7 +3125,7 @@ void QSynEdit::updateVScrollbar() nMaxScroll = maxScrollHeight(); nMin = 0; nMax = std::max(1, nMaxScroll); - nPage = mLinesInWindow; + nPage = mLinesInWindow * mTextHeight; nPos = mTopPos; verticalScrollBar()->setMinimum(nMin); verticalScrollBar()->setMaximum(nMax);