[Differential] [Request, 85 lines] D3683: StandardDocumentationView positioning fixes
antonanikin (Anton Anikin)
noreply at phabricator.kde.org
Thu Dec 15 06:45:27 UTC 2016
antonanikin created this revision.
antonanikin added a reviewer: KDevelop.
antonanikin added a subscriber: kdevelop-devel.
The patch fixes wrong positioning for StandardDocumentationView. Steps to reproduce:
1. Place such test code into editor:
qDebug() << "debug_message";
2. Move cursor to any method and call context help.
3. Help view will be shown with **wrong** position.
4. Recall context help for previous place.
5. Help view will be shown with **right** position.
6. At any help view show we will see fast scrollbar "jumping" from initial (0) to some final position.
The patch provides mechanism to fix this behavior.
1. Some page is loaded and loadFinished() signal emitted, then view set right position inside page.
2. After this, page JS finishes it's work and change font settings (size). This leads to contents "moving" inside view and as a result we have wrong position.
Therefore secondly, we fix position after page loading with simple JS code. JS allow us to "jump" inside already loaded page without it's reloading which happens with using standard view's methods like load() or setUrl().
Such positioning fixing also applied on resize event - standard view's behaviour breaks position during widget resize.
Tested on master branch. For correct work it needs https://phabricator.kde.org/D3671 applied to kdevelop.
To: antonanikin, #kdevelop
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KDevelop-devel