Review Request: flicking of WebView with ScrollWidget
Zack Rusin
zack at kde.org
Wed Mar 24 05:11:23 CET 2010
On Tuesday 23 March 2010 13:53:24 Marco Martin wrote:
> in that way the whole webview would flick instead of the webview contents?
> (webview could also be resized to the whole contents but this would be
> terribly inefficient right?)
Ah, I see, that's the core of the issue. Yea, the scrolling of contents
behavior should probably be configurable with properties just for cases like
this. I don't quite have the time right now to do it in full but the attached
should be 90% there. Maybe you'll like it better than the other approaches.
It basically checks whether the widget which the ScrollWidget is supposed to
scroll has defined the following properties:
- contentsSize
- scrollPosition
- scrollPositionX
- scrollPositionY
and if it does it uses those, instead of statically calling widget->size(),
widget->pos(), widget->x and widget->y.
It should compile/work, but iirc the position to scrollPosition function needs
to be negated somewhere (especially visible since the webview scrolling will
now be inverted and it will probably try to overshoot all the time =) ), I
don't quite have the time right now to start compiling and testing to see
where that position needs to be negated but I think this approach would be
more convenient and cleaner. Especially since it means that the ScrollWidget
would be able to just handle really anything anyone could possibly throw at it
and it would just work (tm) in all cases.
(also possibly viewportGeometry will have to be overwritable for completness
as well).
z
-------------- next part --------------
A non-text attachment was scrubbed...
Name: webviewxy.diff
Type: text/x-patch
Size: 12852 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20100324/3b944549/attachment-0001.diff
More information about the Plasma-devel
mailing list