Commit Graph

386 Commits

Author SHA1 Message Date
Aaron J. Seigo
483851b361 trigger a re-calc of the icon size when text is set. fixes icon presentation on reload at startup
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=758190
2008-01-07 05:09:09 +00:00
Aaron J. Seigo
7b5c62982d commit ryan's black border on tooltip patch so i can merge to the branch soon
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=758187
2008-01-07 04:41:30 +00:00
Aaron J. Seigo
402cfc7d26 self(), not instance(), in line with all other singletons in plasma
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=758186
2008-01-07 04:39:36 +00:00
Percy Leonhardt
84f2fad73e The signalplotter needs to know when it is resized. Otherwise the plots are too short for the current width.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=757903
2008-01-06 12:49:32 +00:00
Marco Martin
454d824d4f removing sizeHint() since it's identical to Widget::sizeHint()
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=757897
2008-01-06 11:41:15 +00:00
Aaron J. Seigo
c00b3a9b4a * drop the "to be hidden timer"
* don't immediately reset isShown, that's why we have the timer in the first place (really, it just looks like left-over code from before the hide timer)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=757828
2008-01-06 00:50:56 +00:00
Aaron J. Seigo
658f0c4bb3 * 150ms delay for already shown tooltips, just as we did with kicker, to prevent overwhelming lower end cpus (or network connections, for that matter)
* 500ms delay for new tooltips up from 300ms which worked rather nicely in kicker as well

(trying to learn from kicker, not forget it ;)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=757827
2008-01-06 00:43:49 +00:00
Riccardo Iaconelli
5ad643f313 Show tooltip after a shorter delay, for discoverability issues.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=757769
2008-01-05 21:16:30 +00:00
Marco Martin
eff9536215 Make icon applets to work in panel:
sizehint of icon widget returns size() instead of the stored one to preventing returning (-1,-1) for the first time
and initialize a size in the icon applet

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=757756
2008-01-05 20:25:18 +00:00
Aaron J. Seigo
f07d73ff53 allow setting the background of icon on/off ... a little sad about this, but no time to do something else atm
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=756868
2008-01-03 21:22:24 +00:00
Christopher Blauvelt
ac040130bf Enable dragging of icons by clicking in the middle of the IconApplet.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=756862
2008-01-03 21:10:07 +00:00
Aaron J. Seigo
dc4981ec41 include a slight mod of ryan's curved corner patch; committing directly to ensure we make the deadline
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=756856
2008-01-03 21:02:32 +00:00
Marco Martin
9a0dcafb8d Substitutes the background svg with a Plasma::roundedRectangle()
this makes the radius of the rounded borders of the background of the icon to look right

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=756763
2008-01-03 18:38:11 +00:00
Aaron J. Seigo
9aaedf4ddc SVN_SILENT: fix the style.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=756757
2008-01-03 18:20:35 +00:00
Luboš Luňák
1ce57b1d7b Fix last commit.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=756632
2008-01-03 13:59:03 +00:00
Luboš Luňák
89ab030a89 Use KWin's TaskbarThumbnail effect to show window previews in tooltips.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=756513
2008-01-03 11:35:42 +00:00
Marco Martin
bef6adb720 added
bool invertedLayout() const;
returns if the layout of the icons should appear inverted or not

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=755891
2008-01-02 10:39:29 +00:00
Marco Martin
b6030dd8b3 added the method
void invertLayout(bool invert);
inverts the layout of the icons if the orientation is horizontal,
normally we get icon on the left with left-to-right languages,
this inverts the behaviour

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=755564
2008-01-01 21:00:37 +00:00
Marco Martin
1ca970c48e added the method
void invertLayout(bool invert);
it inverts the layout of the icons if the orientation is horizontal,
normally we get icon on the left with left-to-right languages,
this inverts the behaviour

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=755562
2008-01-01 20:58:36 +00:00
Aaron J. Seigo
d5c9ab0cf6 style fix and remove the extra assignment.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=755558
2008-01-01 20:53:46 +00:00
Aaron J. Seigo
627cb88ccf all members belong in the dptr.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=755512
2008-01-01 19:21:33 +00:00
Jason Stubbs
7a202c3382 Holding on to the return value of view() as it's a heavy function call. Hiding
the widget's tooltip when the widget is deleted. Fixed coding style.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=754986
2007-12-31 01:45:48 +00:00
Richard J. Moore
48a812947b - Better safe than sorry
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=754964
2007-12-31 00:38:04 +00:00
Richard J. Moore
eb86939c77 - Ensure we don't popup a tooltip when a context menu or other mouse
grabbing activity is occuring as we can obscure it.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=754931
2007-12-30 23:48:25 +00:00
Marco Martin
a87dcb6b19 draws iconSvg correctly
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=754836
2007-12-30 21:00:38 +00:00
Jason Stubbs
b907728254 If a widget doesn't have a size yet, it's bounding rect won't intersect
anything, so also check if its position lies within a view's scene rect.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=754627
2007-12-30 11:44:25 +00:00
Jason Stubbs
c268168eab Overrode sceneEvent() rather than hover(Enter|Leave)Event so that subclasses
that use those events (such as Icon) can still have tooltips. Also behaviour
on mouse move, mouse click and mouse wheel events is also managed.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=754605
2007-12-30 10:45:21 +00:00
Jason Stubbs
f3e52b76cb Record which tooltip is being shown so that tooltip data updates don't change
which to another widget's tooltip.

BUG: 154719

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=754590
2007-12-30 10:17:33 +00:00
Marco Martin
87429288bc removing Icon::setAlignment again
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=754369
2007-12-29 17:09:06 +00:00
Marco Martin
296069a3c1 fixed a typo
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=753790
2007-12-28 14:18:52 +00:00
Marco Martin
3893a56543 bring back a dummy setAlignment, otherwise it breaks too many things
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=753789
2007-12-28 14:16:59 +00:00
Marco Martin
1743b3d9ef support for text beside icons depending of the layout direction, can be set with
void setOrientation(Qt::Orientation orientation);

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=753744
2007-12-28 11:29:56 +00:00
Christopher Blauvelt
06295ace02 Piggyback on mart's patch. Add the ability to set the number of lines in the display, fixes
Icon::Private::elidedText so the display won't be truncated to one line if the whole text doesn't 
fit, and fixes some crashes.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=753049
2007-12-26 13:44:57 +00:00
Marco Martin
27ce118c91 removed the following methods:
calculateSize()
Private::displaySizeHint(const QStyleOptionGraphicsItem *option)
setIconSize(QSizeF)

added layoutIcons(), similar to calculateSize() but it resizes the icon instead of the widget around the icon

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=753033
2007-12-26 12:37:54 +00:00
Craig Duquette
ddc888e9c4 moved setToolTip() and toolTip() to match the updated header which moved these functions to
public

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=752612
2007-12-25 05:36:31 +00:00
Craig Duquette
cd216b2eb8 make setToolTip() and toolTip() public from protected
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=752611
2007-12-25 05:34:43 +00:00
Pino Toscano
0ec187a28e include fixup
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=752169
2007-12-23 19:20:22 +00:00
Marco Martin
5952e90351 White icon text on a semitransparent black background
BUG: 154108

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=752098
2007-12-23 15:13:44 +00:00
Marco Martin
1f84d4c290 removing an experimental piece of junk in drawTextItems committed for mistake...
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=752044
2007-12-23 12:07:31 +00:00
Marco Martin
43574b0c3e Added the method QSizeF sizeFromIconSize(const qreal iconWidth) that returns an optimal size of the widget given a desidered size of the icon
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=752018
2007-12-23 10:51:00 +00:00
Jason Stubbs
c0bba16e87 Fix crash when adding widgets to the panel
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=751539
2007-12-22 06:43:05 +00:00
Shawn Starr
8d9aa19d83 Allow rendering of a specific svg element id. You can still render them all if you don't specify a element name but now you can also use a specific element. Doesn't handle resizing.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=751533
2007-12-22 05:31:57 +00:00
Jason Stubbs
4d641580fa Temporarily hide the tooltip when moving it to fix painting corruption
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=751523
2007-12-22 03:44:25 +00:00
Marco Martin
792e8dfba8 icon actions works again (still not drawn correctly)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=751445
2007-12-21 21:35:07 +00:00
Richard J. Moore
3537033b91 - Partial fix to prevent tooltips being displayed over the top of
popup menus. There's still a problem however as the 1 second timer
  can be started before the menu is triggered. The tooltip code needs
  to detect when this is occuring somehow and suppress the tip in such
  cases.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=751298
2007-12-21 15:59:04 +00:00
Dan Meltzer
357656f660 Add a generic tooltip widget to Plasma::Widget and implement it in the tasks applet.
Applets wishing to use this tooltip should Create a Plasma::ToolTipData struct 
(defined in widget.h) and pass it to Widget::setToolTip().  Showing and hiding
the tooltip is all handled automatically.

While the basic idea is found in this patch, the look still definatly needs some
work.  Still a definate work in progress.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=751113
2007-12-21 05:33:17 +00:00
Aaron J. Seigo
4a23298a2c update()
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=751052
2007-12-20 23:50:11 +00:00
Aaron J. Seigo
0946029d25 very basic svg icon painting
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=750938
2007-12-20 16:28:47 +00:00
Shawn Starr
853710deca call setFile() when changing the svg image for Icon
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=750670
2007-12-19 20:58:45 +00:00
Shawn Starr
60769c4c6f Add convenience method setSvg() to set the Icon's Svg file instead of the default widget/iconbutton svg. Useful for custom svg button behavour
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=750654
2007-12-19 20:32:31 +00:00