Commit Graph

89 Commits

Author SHA1 Message Date
Marco Martin
b6624d3fe1 remove all margins, if somebody wants any, just add them into the mainWidget contentsMargins
svn path=/trunk/KDE/kdelibs/; revision=1184900
2010-10-11 19:01:42 +00:00
Zack Rusin
9d89e5519a Fix transformation artifacts.
The widget does have contents (even if it's inherited) which
was confusing graphicsview and causing wonky artifacts on 
transformations of all widgets that were inside Plasma::ScrollWidget.

svn path=/trunk/KDE/kdelibs/; revision=1179203
2010-09-24 20:36:00 +00:00
Marco Martin
cdc70740bd set the border size to 0
if it will work well enough with existing applications, the border calculation will be just removed

svn path=/trunk/KDE/kdelibs/; revision=1179099
2010-09-24 14:34:40 +00:00
Marco Martin
b968f22439 neither the scrollwidget nor its scrollingwidget child paints by themselves
svn path=/trunk/KDE/kdelibs/; revision=1158783
2010-08-03 18:43:07 +00:00
Aurélien Gâteau
beca8835e1 Set page step of scrollbars
This way the size of the scrollbar slider represents the visible portion of
the scrolled widget.

svn path=/trunk/KDE/kdelibs/; revision=1151665
2010-07-19 09:59:59 +00:00
Marco Martin
bc38bec0c7 ensure the main widget is visible after its resize
CCBUG:226429

svn path=/trunk/KDE/kdelibs/; revision=1140801
2010-06-21 14:56:37 +00:00
Marco Martin
79e61661e7 stop animations when the inner widget spontaneously resize
it should fix 226429 and a very similar issue in the netbook, please test :)
CCBUG:226429

svn path=/trunk/KDE/kdelibs/; revision=1140731
2010-06-21 12:20:48 +00:00
Marco Martin
1f1d59fa4d ensure to never filter pout events from our scrollbaars
svn path=/trunk/KDE/kdelibs/; revision=1138783
2010-06-16 18:47:00 +00:00
Marco Martin
7aa44c8d93 this return is wrong
svn path=/trunk/KDE/kdelibs/; revision=1134141
2010-06-03 14:16:03 +00:00
Aaron J. Seigo
bbc72390b9 only capture the left clicks
CCBUG:240215

svn path=/trunk/KDE/kdelibs/; revision=1133494
2010-06-01 20:42:24 +00:00
Marco Martin
e0b211b52e use KGlobalSettings::dndEventDelay()
svn path=/trunk/KDE/kdelibs/; revision=1128946
2010-05-20 18:45:27 +00:00
Marco Martin
20d58299b2 handle keypresses (but don't steal them)
is the last thing that was missing from kineticscrolling

svn path=/trunk/KDE/kdelibs/; revision=1124609
2010-05-09 16:57:05 +00:00
Marco Martin
6dedeb57f6 port the multitouch part to scrollwidget:
unfortunately i have no way to test it right now, but will make possible to delete kineticscroll and deprecate all the corresponding functions

svn path=/trunk/KDE/kdelibs/; revision=1123940
2010-05-07 12:09:48 +00:00
Marco Martin
b80b091db4 make viewportGeometryChanged actually working
svn path=/trunk/KDE/kdelibs/; revision=1116503
2010-04-19 16:20:08 +00:00
Marco Martin
215e883684 new signal: viewportGeometrychanged
svn path=/trunk/KDE/kdelibs/; revision=1116489
2010-04-19 15:55:04 +00:00
Marco Martin
1d8d908d9b snap animations are snapX and snapY
still todo, create them only when snap is on

svn path=/trunk/KDE/kdelibs/; revision=1116414
2010-04-19 12:44:09 +00:00
Marco Martin
dfb46bb03e a new property: snapSize if one wants to always make the scroll end aligned to a certain grid (is a size, so snap can be different horizontal and vertical)
svn path=/trunk/KDE/kdelibs/; revision=1116100
2010-04-18 16:31:07 +00:00
Marco Martin
90a4225a91 add the size of the proper scrollbar, fix epic sizehint fail
svn path=/trunk/KDE/kdelibs/; revision=1112910
2010-04-09 13:18:25 +00:00
Marco Martin
192052b0b7 -make sure hints are invalidated when the inner widget resizes
-the size hint should take into account the -double- border

svn path=/trunk/KDE/kdelibs/; revision=1112548
2010-04-08 13:14:55 +00:00
Marco Martin
a6c55a9cf3 take scrollbars into account for preferred size hint
minimum size is still fixed, basing on the contained widget doesn't work

svn path=/trunk/KDE/kdelibs/; revision=1112299
2010-04-07 19:54:44 +00:00
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