Commit Graph

49 Commits

Author SHA1 Message Date
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
Jacopo De Simoi
225cab4ef4 workaround some qt bug which makes children items disappear when toggling the ItemClipsChildrenToShape flag
svn path=/trunk/KDE/kdelibs/; revision=1029853
2009-09-30 22:10:35 +00:00
Marco Martin
2d2c2ea22f better logic to enable/disable borders
svn path=/trunk/KDE/kdelibs/; revision=1029755
2009-09-30 17:05:40 +00:00
Marco Martin
c134158608 better logic to show/hide borders, still seems to not delete them in
some cases

svn path=/trunk/KDE/kdelibs/; revision=1029416
2009-09-29 17:36:56 +00:00
Marco Martin
b7768c774c check for null widget
bound the passed rect to the widget bounding rect

svn path=/trunk/KDE/kdelibs/; revision=1027836
2009-09-24 21:27:40 +00:00
Marco Martin
80f675df0d setX, not setY
svn path=/trunk/KDE/kdelibs/; revision=1027831
2009-09-24 21:15:47 +00:00
Marco Martin
a4d591e6fd ensureRectVisible() a rect in internal widget coordinates will cause an
animated scroll until the rect becomes visible
it should not collide with kinetic scroll since the anim is stopped as
soon as amouse or wheel event is triggered
CCMAIL:plasma-devel@kde.org

svn path=/trunk/KDE/kdelibs/; revision=1027814
2009-09-24 20:40:16 +00:00
Adenilson Cavalcanti Da Silva
304469cb0a Keeping scrollwheel events within the scrollwidget. This allows to use
scrollwheel to roll the widget (e.g. uBlog) and not the whole 
plasma-netbook newspaper screen.


svn path=/trunk/KDE/kdelibs/; revision=1026749
2009-09-22 13:47:24 +00:00
Marco Martin
e24e0294e3 was width, not height
svn path=/trunk/KDE/kdelibs/; revision=1025763
2009-09-19 16:06:41 +00:00
Marco Martin
efbe7150fd enable/disable shadows and scrollbard indipendently
svn path=/trunk/KDE/kdelibs/; revision=1025749
2009-09-19 15:35:16 +00:00
Adenilson Cavalcanti Da Silva
974df6773a Adding a kinetic scrolling class and using it in plasma::ScrollWidget.
ATM, it uses timers to do the animation, the idea is to use factory pattern
and implement the animation with QProperyAnimation too (using Qt 4.6).


svn path=/trunk/KDE/kdelibs/; revision=1024929
2009-09-17 16:24:19 +00:00
Marco Martin
afad9ce8a2 take the proper elements
svn path=/trunk/KDE/kdelibs/; revision=1011453
2009-08-14 17:26:15 +00:00
Marco Martin
fd28c2f7db was custom for the netbook thinghie, but realized that cutted away
contents are quite ugly everywhere, so generalizing: when a scrollbar is
on, enable borders that gives a sunken feel on it, making a
justification for the text brutally clipped

svn path=/trunk/KDE/kdelibs/; revision=1006503
2009-08-03 20:41:42 +00:00
Marco Martin
af839dc89c when the scrolbar visibility is udated activate the layout and do
resize, this should avoid the unnecessary horizontal scrollbar in the
microblog applet

svn path=/trunk/KDE/kdelibs/; revision=1002239
2009-07-25 13:14:19 +00:00
Marco Martin
c702490625 resize the widget -after- hadjusting the scrollbar visibility
svn path=/trunk/KDE/kdelibs/; revision=1002234
2009-07-25 12:48:30 +00:00
Marco Martin
75e7968ae5 don't make a loop of scrollbar updating->position updating
svn path=/trunk/KDE/kdelibs/; revision=979074
2009-06-08 21:06:23 +00:00
Marco Martin
49043d7f49 update scrollbars position if the widget gets moved
svn path=/trunk/KDE/kdelibs/; revision=979057
2009-06-08 20:33:56 +00:00
Wang Kai
ec7651c5e1 Scroll fix:
If scroll widget is wider/taller than the internal widget,
then the internal widget should be positioned to scroll widget's top left, not bottom right.


svn path=/trunk/KDE/kdelibs/; revision=951376
2009-04-09 04:52:38 +00:00
Marco Martin
eb46f78fd9 scrollbarPolicy->scrollBarPolicy, luckily it was spotted before any
release :)

svn path=/trunk/KDE/kdelibs/; revision=945072
2009-03-26 20:21:48 +00:00
Marco Martin
ff578a8af4 a widget that allows the contents to scroll when
content is bigger than the widget itself by adding scrollbars

svn path=/trunk/KDE/kdelibs/; revision=934731
2009-03-03 17:31:54 +00:00