forked from qt-creator/qt-creator
Help/textbrowser: Keep text at the top visible when resizing and zooming
After resizing/zooming scroll to the position of the top element before the resize. This allows us to remove the hack that delays jumping to the anchor of an URL as well. Fixes: QTCREATORBUG-4756 Change-Id: Ife29ba1cd0ad60448052b4d06a5dce7cc6bdf4ed Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -95,14 +95,18 @@ public:
|
||||
|
||||
void setSource(const QUrl &name) override;
|
||||
|
||||
void withFixedTopPosition(const std::function<void()> &action);
|
||||
|
||||
protected:
|
||||
void contextMenuEvent(QContextMenuEvent *event) override;
|
||||
bool eventFilter(QObject *obj, QEvent *event) override;
|
||||
void mousePressEvent(QMouseEvent *e) override;
|
||||
void mouseReleaseEvent(QMouseEvent *e) override;
|
||||
void resizeEvent(QResizeEvent *e) override;
|
||||
|
||||
private:
|
||||
QString linkAt(const QPoint& pos);
|
||||
QString linkAt(const QPoint &pos);
|
||||
void scrollToTextPosition(int position);
|
||||
|
||||
int zoomCount;
|
||||
bool forceFont;
|
||||
|
||||
Reference in New Issue
Block a user