Commit Graph

73 Commits

Author SHA1 Message Date
Aaron J. Seigo
6c5f292e2f we're not checking the value, use a static_cast
svn path=/trunk/KDE/kdelibs/; revision=1125894
2010-05-12 16:17:33 +00:00
Marco Martin
fe9e96f8bf reset the old icon when a mouseover occurs
svn path=/trunk/KDE/kdelibs/; revision=1125592
2010-05-11 19:43:19 +00:00
Marco Martin
2fa6d4204c - when the background gets enabled, recalculate hints
- always add item margins to the hint

svn path=/trunk/KDE/kdelibs/; revision=1119097
2010-04-26 14:50:54 +00:00
Marco Martin
e979201682 add maximumIconSize and minimumIconSize properties: last step to have sane size hints
svn path=/trunk/KDE/kdelibs/; revision=1119084
2010-04-26 14:17:08 +00:00
Marco Martin
6bad7500be take the max between width and height
svn path=/trunk/KDE/kdelibs/; revision=1118354
2010-04-24 14:03:48 +00:00
Marco Martin
5b49fc05e1 new property: preferredIconSize, aka the final solution to all layout problems
svn path=/trunk/KDE/kdelibs/; revision=1118322
2010-04-24 12:08:13 +00:00
Marco Martin
b9de116f33 get the margins right.
give the natural svg size if the icon is a svg

svn path=/trunk/KDE/kdelibs/; revision=1118304
2010-04-24 11:30:09 +00:00
Marco Martin
5d9b77ed76 reset any svg icon if a normal one gets set
svn path=/trunk/KDE/kdelibs/; revision=1117890
2010-04-23 11:35:43 +00:00
Marco Martin
5560dae986 scale coherently also the old icon during the animation
svn path=/trunk/KDE/kdelibs/; revision=1108404
2010-03-28 19:55:51 +00:00
Marco Martin
621ead5280 IconMargin is useful only to give good proportion when there is text,
when there isn't we want the whole size to be really precise with size
calculations

svn path=/trunk/KDE/kdelibs/; revision=1108320
2010-03-28 15:59:45 +00:00
Marco Martin
2f308de3da always reset the icon change timer: will cause less unneeded animations
svn path=/trunk/KDE/kdelibs/; revision=1100808
2010-03-08 17:44:59 +00:00
Marco Martin
8c2dc5036a the proper text to use here is action->toolTip()
CCMAIL:thomas.luebking@web.de

svn path=/trunk/KDE/kdelibs/; revision=1097986
2010-03-02 15:27:51 +00:00
Marco Martin
3408ebe777 we don't want acelerator markers in tooltips
svn path=/trunk/KDE/kdelibs/; revision=1097929
2010-03-02 13:02:51 +00:00
Marco Martin
3a2a21d34a actually disable the fade when a bunch of fast changes (animation frames) happen
svn path=/trunk/KDE/kdelibs/; revision=1093280
2010-02-20 14:19:29 +00:00
Marco Martin
a9cc788fb2 animate icon change with fade, but only if the chage doesn't happen too frequently (so is still possible to fo an animation by quicky change the icon)
svn path=/trunk/KDE/kdelibs/; revision=1091092
2010-02-16 17:24:35 +00:00
Marco Martin
bd87a3f3b7 simplify a bit, now Svg can return directly a pixmap
svn path=/trunk/KDE/kdelibs/; revision=1091013
2010-02-16 14:38:58 +00:00
Marco Martin
ee81c23d18 check if the animation actually exists
svn path=/trunk/KDE/kdelibs/; revision=1087327
2010-02-08 20:47:29 +00:00
Bruno de Oliveira Abinader
22c390a768 Fixed IconWidget's item action animation (s/ZoomAnimation/PixmapTransitionAnimation)
svn path=/trunk/KDE/kdelibs/; revision=1087296
2010-02-08 19:27:12 +00:00
Bruno de Oliveira Abinader
bf225098a9 Updated Plasma IconWidget to use new animation API + QPropertyAnimation
svn path=/trunk/KDE/kdelibs/; revision=1085753
2010-02-05 21:46:51 +00:00
Marco Martin
877957aa18 remove the pressed state on hoverleaveevent. useful when an eventfilter steals the mousereleaseevent (like scrollwidget::registerAsDragHandle())
svn path=/trunk/KDE/kdelibs/; revision=1084837
2010-02-03 20:52:03 +00:00
Marco Martin
8ee524d172 IconAction refuses to display and to be activated if the underlying QAction is invisible or disabled
svn path=/trunk/KDE/kdelibs/; revision=1072708
2010-01-10 19:34:33 +00:00
Marco Martin
c1e947a768 when the icon is horizontal and there is no text take the min between width and height as icon size.
among other things fixes the unhide arrow of the systray

svn path=/trunk/KDE/kdelibs/; revision=1071365
2010-01-07 21:58:51 +00:00
John Layt
6e9943e36c krazy fixes, mostly include guards and copyright tags
svn path=/trunk/KDE/kdelibs/; revision=1066779
2009-12-27 22:16:11 +00:00
Marco Martin
96d2513e9e -minimum size hint
-when the text changes discard the cached hints

svn path=/trunk/KDE/kdelibs/; revision=1066299
2009-12-26 17:29:55 +00:00
Marco Martin
010bcc9629 don't try to draw an halo rect if the size is empty (amarok action icons look better now)
svn path=/trunk/KDE/kdelibs/; revision=1065132
2009-12-22 16:02:26 +00:00
Marco Martin
92d3cdc0a3 a bit more spacing to avoid ellipsis
svn path=/trunk/KDE/kdelibs/; revision=1060754
2009-12-09 20:10:22 +00:00
Marco Martin
c95a699031 don't paint the background also if the color is totally ransparent
svn path=/trunk/KDE/kdelibs/; revision=1057251
2009-12-01 20:10:49 +00:00
Marco Martin
6d38a2a3b6 use different focus and hover for horizontal and vertical sliders
svn path=/trunk/KDE/kdelibs/; revision=1055167
2009-11-27 13:42:00 +00:00
Marco Martin
3c84247ae6 move halopainter unchanged in libplasma, keep it private and expose
drawhalo in PaintUtils
iconwidgets uses it if there is no backgroundcolor explicitly setted
CCMAIL:fredrik@kde.org

svn path=/trunk/KDE/kdelibs/; revision=1054830
2009-11-26 21:57:36 +00:00
Petri Damstén
71fa982797 * Use correct font for size hint in Frame
* Use correct font in IconWidget setLayoutOptions
* layout fonts are set in IconWidget setLayoutOptions and layoutTextItems. No need to set them in paint.
* Fix using QGraphicsWidget font when customFont == true in several widgets.

svn path=/trunk/KDE/kdelibs/; revision=1047017
2009-11-10 09:46:14 +00:00
Marco Martin
1b945b8aff removeIconAction(0) clears the actions
svn path=/trunk/KDE/kdelibs/; revision=1044330
2009-11-03 13:10:19 +00:00
Aaron J. Seigo
0d90362d1a * lump all actions over the max at the end
* don't use magic numbers but the enum
* don't leak icon items when the action is destroyed

svn path=/trunk/KDE/kdelibs/; revision=1035440
2009-10-15 02:39:38 +00:00
Aaron J. Seigo
d2e3cf28cb do some caching
svn path=/trunk/KDE/kdelibs/; revision=1029904
2009-10-01 00:58:41 +00:00
Marco Martin
14fed09f70 give a really light gradient to the text background, it gives a more
finished look

svn path=/trunk/KDE/kdelibs/; revision=1028591
2009-09-27 17:32:49 +00:00
Marco Martin
5cc2ddf8ad always use plasma::theme font, unless somebody call setFont on the
widget
round one:widgets that draws themselves without native()-render()
and don't have a setFont function themselves

svn path=/trunk/KDE/kdelibs/; revision=1022897
2009-09-13 13:13:55 +00:00
Marco Martin
664a262df2 use the width of the largest word as the width size hint
svn path=/trunk/KDE/kdelibs/; revision=1022099
2009-09-10 19:55:29 +00:00
Marco Martin
1e4746035f set margins around the icon dependent on the svg margins or on the
widget's contentsmargins if set

svn path=/trunk/KDE/kdelibs/; revision=1021623
2009-09-09 17:03:22 +00:00
Marco Martin
7ef4b04838 sensible size hints
svn path=/trunk/KDE/kdelibs/; revision=1019577
2009-09-03 22:24:29 +00:00
Marco Martin
1fe4e538f0 don't bother to draw the rect if the text bounding rect is empty
svn path=/trunk/KDE/kdelibs/; revision=1008830
2009-08-08 13:10:37 +00:00
Aaron J. Seigo
367140c8e1 base the size on the option rect
svn path=/trunk/KDE/kdelibs/; revision=986456
2009-06-24 16:54:51 +00:00
Aaron J. Seigo
b16294bdec it looks far, far better with that margin, i'm afraid.
svn path=/trunk/KDE/kdelibs/; revision=982045
2009-06-14 20:14:28 +00:00
Aaron J. Seigo
c7c841e33a SVN_SILENT: sshh
svn path=/trunk/KDE/kdelibs/; revision=982008
2009-06-14 18:09:41 +00:00
Aaron J. Seigo
23638e7f84 only return a curved shape if we are drawing the curved background
svn path=/trunk/KDE/kdelibs/; revision=979520
2009-06-10 02:18:41 +00:00
Aaron J. Seigo
c2717ed3f2 not sure if i like this (visually) yet, but let's try with a zero px border
BUG:177871

svn path=/trunk/KDE/kdelibs/; revision=979507
2009-06-10 00:06:51 +00:00
Marco Martin
c96b3739db use klocale to kill mnemonics
svn path=/trunk/KDE/kdelibs/; revision=971913
2009-05-23 17:16:15 +00:00
Marco Martin
9622b2cfe8 qtextayout can't show mnemonics, so when there is a qaction use
painter.drawtext
(unlikely we will have a multiline caption in this case)
this should fix the & appearing in the desktop toolbox

svn path=/trunk/KDE/kdelibs/; revision=969532
2009-05-18 13:20:32 +00:00
Marco Martin
92b51d7751 set a tooltip only when the main text is elided
BUG: 189716

svn path=/trunk/KDE/kdelibs/; revision=964973
2009-05-07 18:49:22 +00:00
Aaron J. Seigo
9ddc33a663 allow setting a QAction on push and tool buttons
svn path=/trunk/KDE/kdelibs/; revision=958514
2009-04-24 07:40:52 +00:00
Marco Martin
63c009bf68 unbreak the animation of text background
svn path=/trunk/KDE/kdelibs/; revision=954953
2009-04-16 15:41:56 +00:00
Aaron J. Seigo
4c009d93d4 allow a color lozenge behind the text to make it work on any sort of background
svn path=/trunk/KDE/kdelibs/; revision=952083
2009-04-10 21:16:14 +00:00