Commit Graph

44 Commits

Author SHA1 Message Date
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
Davide Bettio
2f0da61660 The previous "hover effect on drag" patch was buggy. Now we are using sceneEventFilter and it seems better.
svn path=/trunk/KDE/kdelibs/; revision=948792
2009-04-03 19:57:13 +00:00
Davide Bettio
44d2194253 Use hover background when something is dragged on the icon.
BUG: 110952

svn path=/trunk/KDE/kdelibs/; revision=948303
2009-04-02 18:33:39 +00:00
Harald Hvaal
570242531f Make the iconwidget's a teeny bit smaller when pressed down. This gives a good response when clicking buttons in plasma.
svn path=/trunk/KDE/kdelibs/; revision=946711
2009-03-30 06:42:19 +00:00
Marco Martin
a219e97dae correct shadow color
svn path=/trunk/KDE/kdelibs/; revision=935565
2009-03-05 16:24:12 +00:00
Alessandro Diaferia
bb01ec253d use boundingRect instead of geometry otherwise the signal will never be emitted
svn path=/trunk/KDE/kdelibs/; revision=924644
2009-02-11 10:24:06 +00:00
Marco Martin
501b3bfe1c align text to the left when the icon is horizontal
svn path=/trunk/KDE/kdelibs/; revision=923738
2009-02-09 10:51:21 +00:00
Frederik Schwarzer
83f2503169 global typo fix
svn path=/trunk/KDE/kdelibs/; revision=922431
2009-02-07 01:12:28 +00:00
Alessandro Diaferia
82fb975523 a useful method to remove a previously set iconAction
svn path=/trunk/KDE/kdelibs/; revision=916376
2009-01-25 09:58:02 +00:00
Aaron J. Seigo
fb8af31791 some missing API bits
svn path=/trunk/KDE/kdelibs/; revision=914441
2009-01-21 05:59:33 +00:00
Aaron J. Seigo
9d262c3619 update() on icon config changes
BUG:181298

svn path=/trunk/KDE/kdelibs/; revision=913904
2009-01-20 02:37:52 +00:00
Marco Martin
e2e814e9bf IconWidget background looked freaking old, now uses the svg backgrond from
the folderview icons (and as a bonus it's even less code :D)

svn path=/trunk/KDE/kdelibs/; revision=913758
2009-01-19 20:41:45 +00:00
Aaron J. Seigo
fe0acf8202 clean this up while we still can. not sure how this one slipped by us, but it's been on my list for a week; no actual logic changes, just cleans out the header of crud that doesn't belong.
svn path=/trunk/KDE/kdelibs/; revision=906780
2009-01-06 21:11:54 +00:00
Aaron J. Seigo
d8c68f8d5f update the icon when the svg changes
svn path=/trunk/KDE/kdelibs/; revision=906159
2009-01-05 17:34:40 +00:00
Sebastian Kügler
168ae12dc5 svn path=/trunk/KDE/kdelibs/; revision=903301 2008-12-30 12:53:33 +00:00
Aaron J. Seigo
e193aaa46e if there's a tooltip set, keep it in sync with the action
svn path=/trunk/KDE/kdelibs/; revision=902698
2008-12-28 23:52:41 +00:00
Aaron J. Seigo
bad9871ccf * remove some dead code
* set a 1px margin only if there is no background
* use width, not height, went horizontal and there is no text
BUG:177871

svn path=/trunk/KDE/kdelibs/; revision=897398
2008-12-15 23:42:29 +00:00
Marco Martin
1c4f777dd4 hide and unhide the icon when its action visibility changes (no more
ghost lockers with zoomed out desktop:)

svn path=/trunk/KDE/kdelibs/; revision=892159
2008-12-03 17:53:13 +00:00
Aaron J. Seigo
5dbc0a7da0 don't hang onto deleted actions
svn path=/trunk/KDE/kdelibs/; revision=885851
2008-11-18 00:33:44 +00:00
Marco Martin
34f2f49a87 when the svg element id changes the pixmap must be generated again
svn path=/trunk/KDE/kdelibs/; revision=880555
2008-11-05 20:43:53 +00:00
Aaron J. Seigo
df73771a1b ++compile
svn path=/trunk/KDE/kdelibs/; revision=879801
2008-11-04 02:55:37 +00:00
Aaron J. Seigo
1b523b9054 ok, this time JUST the plasma dir ;)
svn path=/trunk/KDE/kdelibs/; revision=879759
2008-11-03 23:08:39 +00:00
Aaron J. Seigo
fa5a2d87d9 bum-de-dum! plasma to kdelibs.
svn path=/trunk/KDE/kdelibs/; revision=879757
2008-11-03 23:03:26 +00:00
Kevin Ottens
f66b4d819b API changes as announced:
* ConfigXml becomes ConfigLoader
  * Containment::(add|remove)ToolBoxTool(QAction *action) becomes
    Containment::(add|remove)ToolBoxAction(QAction *action)
  * Flash becomes FlashingLabel
  * Icon becomes IconWidget
  * PanelSvg becomes FrameSvg

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=877504
2008-10-29 17:46:33 +00:00