Commit Graph

95 Commits

Author SHA1 Message Date
Marco Martin
5d9766f6c1 break; in the switch,
crash--

svn path=/trunk/KDE/kdelibs/; revision=1202309
2010-11-30 12:04:44 +00:00
Marco Martin
0d168b6c57 don't try to treat touch events as mose ones
crash--

svn path=/trunk/KDE/kdelibs/; revision=1200789
2010-11-25 19:30:55 +00:00
Kevin Ottens
c09422cc8c Remove deprecated symbols from the build (if KDE_NO_DEPRECATED is defined).
svn path=/trunk/KDE/kdelibs/; revision=1192863
2010-11-04 08:06:43 +00:00
Marco Martin
c251a29564 fix logic about show/hide of scrollbars
svn path=/trunk/KDE/kdelibs/; revision=1191181
2010-10-29 21:09:06 +00:00
Marco Martin
37d302047e don't block events on text elements that have Qt::TextSelectableByMouse
svn path=/trunk/KDE/kdelibs/; revision=1189643
2010-10-25 13:37:31 +00:00
Marco Martin
395cd8e146 FEATURE: new property: overflowBordersVisible
it can enable/disable the painting of the borders when the inner widget is bigger then the viewport

svn path=/trunk/KDE/kdelibs/; revision=1184911
2010-10-11 19:59:47 +00:00
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