Commit Graph

69 Commits

Author SHA1 Message Date
Marco Martin
7e27da128e when the inner widget has scroll properties, invert the proper values in fixupanimation
svn path=/trunk/KDE/kdelibs/; revision=1111023
2010-04-04 16:54:42 +00:00
Marco Martin
2f8e70b7ab make the webview widget use scrollwidget for flicking
still some issues to fix, but most of the behaviour is ported.
patch based on zack's work
CCMAIL:zack@kde.org

svn path=/trunk/KDE/kdelibs/; revision=1108058
2010-03-27 17:44:16 +00:00
Marco Martin
07ad834e81 scroll horizontally when the scroll is vertical and there was no space to scroll vertically
and vice versa for horizontal scroll

svn path=/trunk/KDE/kdelibs/; revision=1106404
2010-03-22 18:36:57 +00:00
Marco Martin
76d131a501 experiment two behavioural changes:
- don't flick when the contents are smaller than the view (or flick only for the axis where the contents are bigger)
- still pass mouse moves to childrens so they can initiate drags (useful? annoying? still to be found, but necessary for netbook sal to work at the moment)

svn path=/trunk/KDE/kdelibs/; revision=1105167
2010-03-19 12:09:08 +00:00
Marco Martin
26a4b3f20d register/unregoster as drag handles is deprecated now since it's automatic
svn path=/trunk/KDE/kdelibs/; revision=1104888
2010-03-18 20:22:03 +00:00
Zack Rusin
3c0cffc506 Implement wheel scrolling and add a way of disabling overshoot.
plus some doc cleanups.

svn path=/trunk/KDE/kdelibs/; revision=1104868
2010-03-18 19:22:52 +00:00
Zack Rusin
82702e7043 Improve kinetic scrolling on ScrollWidget
As previously discussed with this approach we can actually properly intercept events from child items. Furthermore now we properly "steal" events which cause a flick (it's important for child items to properly act on mouseReleaseEvents and not on mousePressEvents as some like to do, since it's the release events that cause a flick) so items don't get clicks when flicked. The physics and especially the overshoot behavior is a lot better in this code as well.
Review http://reviewboard.kde.org/r/3312/


svn path=/trunk/KDE/kdelibs/; revision=1104841
2010-03-18 18:14:39 +00:00
Marco Martin
2e9b47d6bd if the user dragged less than KGlobalSettings::dndEventDelay() and releases, don't drag, but pass the click, start to drag after that threshold
svn path=/trunk/KDE/kdelibs/; revision=1084809
2010-02-03 20:08:57 +00:00
Marco Martin
2ee4189268 give it a minimum size hint
svn path=/trunk/KDE/kdelibs/; revision=1066298
2009-12-26 17:27:19 +00:00
Marco Martin
923d772a85 delay only in the case the item to be visible is a qgraphicswidget, so we can guard the temp pointer with a weak one
BUG:219475

svn path=/trunk/KDE/kdelibs/; revision=1064800
2009-12-21 20:29:08 +00:00
Marco Martin
fdae3f0d59 This patch forward the "stateChanged" signal emitted from the private kinetic scroll animation all the way to Plasma::ScrollWidget, which then forwards this signal to its childs. This enables an object which derives from Plasma::ScrollWidget to know the kinetic scrolling animation state.
Patch by Bruno Abinader

svn path=/trunk/KDE/kdelibs/; revision=1064768
2009-12-21 18:36:39 +00:00
Marco Martin
20bed9f073 add the missing constructor with a qgi as parent, as all the qgraphicswidget have
svn path=/trunk/KDE/kdelibs/; revision=1063597
2009-12-18 21:44:02 +00:00
Marco Martin
4b8b780829 don't do adjustScrollbars more than every 200 msecs
resolves some cyclical relayout crashes and surprisingly enough also some layout estetic problems
BUG:202890

svn path=/trunk/KDE/kdelibs/; revision=1062764
2009-12-15 21:37:07 +00:00
Marco Martin
2165a85a9f since widget can be deleted from the outside use a weak pointer
svn path=/trunk/KDE/kdelibs/; revision=1062742
2009-12-15 20:37:22 +00:00
Marco Martin
a09d6fbc44 always call the base class resize
svn path=/trunk/KDE/kdelibs/; revision=1060723
2009-12-09 18:50:59 +00:00
Darío Andrés Rodríguez
c9d1959026 - Remove several warnings about unused parameters
http://reviewboard.kde.org/r/2252/
  I didn't applied Q_UNUSED to "parent" pointers as this looks suspicious to me, and it needs more review.


svn path=/trunk/KDE/kdelibs/; revision=1058428
2009-12-04 13:01:33 +00:00
Giulio Camuffo
7e3bdb55e5 better wait for the parentItem to resize before calculating the rect of the item to be visible
svn path=/trunk/KDE/kdelibs/; revision=1057266
2009-12-01 20:49:34 +00:00
Marco Martin
ea0494d0fb round the position to integer, prevents an ugly effect of dancing fonts
svn path=/trunk/KDE/kdelibs/; revision=1051556
2009-11-19 19:40:07 +00:00
Marco Martin
4ffc256c8b ignore right mouse events
svn path=/trunk/KDE/kdelibs/; revision=1050222
2009-11-16 22:05:35 +00:00
Aaron J. Seigo
4162839c2b d->widget can be 0
svn path=/trunk/KDE/kdelibs/; revision=1048893
2009-11-14 04:31:06 +00:00
Marco Martin
81a6c7e23a don't pass mouse release to the drag handles if the mouse moved over
dndEventDelay

svn path=/trunk/KDE/kdelibs/; revision=1048617
2009-11-13 16:03:02 +00:00
Marco Martin
377e6bf9c1 kineticscroll accepts keyboard events too, scrollwidget scrollbars don't
accept focus

svn path=/trunk/KDE/kdelibs/; revision=1048165
2009-11-12 20:44:02 +00:00
Marco Martin
ca60a5a6cf convert the function to a qgraphicswidget:
sceneeventfilter appears to eat events always and in this way i can
remove elements from dragHandles when they get deleted

svn path=/trunk/KDE/kdelibs/; revision=1045818
2009-11-06 20:20:35 +00:00
Marco Martin
3639317617 send the event to the widget, it will have coordinates mapped in a more
precise way

svn path=/trunk/KDE/kdelibs/; revision=1045778
2009-11-06 18:58:47 +00:00
Marco Martin
60eabf5382 void registerAsDragHandle(QGraphicsItem *item);
easy way to keep the flickable scrolling even with clickable sub items

svn path=/trunk/KDE/kdelibs/; revision=1045776
2009-11-06 18:57:35 +00:00
Marco Martin
5789ff1883 remove magic numbers
svn path=/trunk/KDE/kdelibs/; revision=1045319
2009-11-05 19:21:25 +00:00
Marco Martin
2d0f7dc81b set the proper margins:.. todo: constant, not magic numbers
svn path=/trunk/KDE/kdelibs/; revision=1045303
2009-11-05 18:37:38 +00:00
Marco Martin
dd581265cf move the extra border in the size hint
svn path=/trunk/KDE/kdelibs/; revision=1041792
2009-10-28 14:19:34 +00:00
Marco Martin
c470055a37 revert the last patch: when there is clipping the borders can't be
children of the scrolling widget

svn path=/trunk/KDE/kdelibs/; revision=1038759
2009-10-21 19:47:20 +00:00
Marco Martin
7e80fdd8f1 use anchorlayout, quite a good quantity of code wiped out,
workaround to an annoying anchorlayout crasher tough

svn path=/trunk/KDE/kdelibs/; revision=1038665
2009-10-21 15:26:08 +00:00
Marco Martin
637a50e17c disable the clipping hack
svn path=/trunk/KDE/kdelibs/; revision=1038652
2009-10-21 15:01:06 +00:00
Marco Martin
7423a261dd keep a 1 pixel border
svn path=/trunk/KDE/kdelibs/; revision=1038647
2009-10-21 14:48:14 +00:00
Marco Martin
9f806ddf48 decide based on the sizehint whether resize the internal widget or not
svn path=/trunk/KDE/kdelibs/; revision=1038632
2009-10-21 14:32:24 +00:00
Marco Martin
82317bda2d take in consideration the size hint of the internal widget for the own
sized hint

svn path=/trunk/KDE/kdelibs/; revision=1038245
2009-10-20 21:37:46 +00:00
Marco Martin
b2bb69732a provide the Animator::registerScrollingManager(qgraphicsidget) function.
the animator creates a kineticscroll and associates it with the widget.
in this way we can use kineticscroll outside of libplasma with a single
call.

svn path=/trunk/KDE/kdelibs/; revision=1037751
2009-10-19 22:10:25 +00:00
Marco Martin
4191b96c6d force to invalidate the size hint when the inner widget size changes
svn path=/trunk/KDE/kdelibs/; revision=1036087
2009-10-16 14:53:11 +00:00
Marco Martin
31cb2730ea size hint is the inner widget size
svn path=/trunk/KDE/kdelibs/; revision=1036073
2009-10-16 14:10:55 +00:00
Marco Martin
1d611eac34 initialize the layout as soon as possible, crash--?
svn path=/trunk/KDE/kdelibs/; revision=1036032
2009-10-16 11:14:46 +00:00
Marco Martin
451cf321a2 forgotten to commit before: migrate to the new api
svn path=/trunk/KDE/kdelibs/; revision=1035760
2009-10-15 20:12:01 +00:00
Marco Martin
e6661712a8 don't reset to zero the position on scrollbar move
svn path=/trunk/KDE/kdelibs/; revision=1034699
2009-10-13 10:10:08 +00:00
Marco Martin
38884ccd1a now the api is similar to what webkit offers and horizontal and vertical
scroll is done in pixels and in a single pass.                                          
we have 3 properties in widgets that wants to support scroll:
scrollPosition
viewportGeometry
constentsSize


svn path=/trunk/KDE/kdelibs/; revision=1032821
2009-10-08 16:04:56 +00:00
Giulio Camuffo
86cffbab45 suppress some runtime complaints of QGraphicsGridLayout
svn path=/trunk/KDE/kdelibs/; revision=1032423
2009-10-07 19:27:01 +00:00
Adenilson Cavalcanti Da Silva
3d33d3f28f Factoring the ratio of widget/viewport size when doing the
kinetic scrolling.

This will help to have a proper scrolling in cases that the
viewport is several times smaller than the widget size.


svn path=/trunk/KDE/kdelibs/; revision=1032023
2009-10-06 16:58:42 +00:00
Aaron J. Seigo
23d1402a5d --compile_warnings;
svn path=/trunk/KDE/kdelibs/; revision=1031625
2009-10-05 16:08:31 +00:00
Giulio Camuffo
81b39250cb added ensureItemVisible(QGraphicsItem*)
svn path=/trunk/KDE/kdelibs/; revision=1031380
2009-10-04 20:08:37 +00:00
Igor Trindade Oliveira
2147d8e090 put return return d->widget->boundingRect(); in ScrollWidget::viewport() and everything starts to work -perfectly-
notmart

svn path=/trunk/KDE/kdelibs/; revision=1030979
2009-10-03 16:51:52 +00:00
Igor Trindade Oliveira
cab81476e3 fix: rounded-off errors
svn path=/trunk/KDE/kdelibs/; revision=1030709
2009-10-03 03:27:52 +00:00
Marco Martin
faa91ca8e5 don't make borders appear and disappear each resize
svn path=/trunk/KDE/kdelibs/; revision=1030637
2009-10-02 20:17:45 +00:00
Marco Martin
7387d79cbd give d->widget the focus when the focus arrives on us
svn path=/trunk/KDE/kdelibs/; revision=1030582
2009-10-02 16:07:06 +00:00
Adenilson Cavalcanti Da Silva
99cdc241c3 Making kinetic scrolling class generic.
The current design uses 3 properties to calculate movement (horizontal/vertical 
position and the viewport size) being up to the client class (e.g. ScrollWidget)
move its widgets when the position property changed.

It will allow to reuse the kinetic scrolling class with other plasmoids.


svn path=/trunk/KDE/kdelibs/; revision=1030136
2009-10-01 16:47:19 +00:00