Bug 98719 - kdeui: KLed does not use the background-pixmap, set by "setPaletteBackgroundPixmap()"
Summary: kdeui: KLed does not use the background-pixmap, set by "setPaletteBackgroundP...
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-06 21:02 UTC by Markus
Modified: 2010-09-22 23:31 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.6.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus 2005-02-06 21:02:44 UTC
Version:            (using KDE KDE 3.3.2)
Installed from:    Debian testing/unstable Packages
OS:                Linux

I currently make a small applet with KLeds. But KLed ignores the background-pixmap I previously set by setPaletteBackgroundPixmap(). (This has worked with all QT-* things, to make them look pseudo transparent). So I looked in the source of the version I use (3.3.2) and the very current cvs version. In both I found something like this:

    tmpMap = new QPixmap(width + 6, width + 6);
    tmpMap->fill(paletteBackgroundColor());
    paint.begin(tmpMap);

This creates the pixmap, but only uses paletteBackgroundColor. In the whole kled source paletteBackgroundPixmap is never used.

I just start coding with KDE/QT (~1/2Y), so I am currently not able to make a patch...
Comment 1 Maksim Orlovich 2005-04-12 17:40:51 UTC
A test app would be nice
Comment 2 Maksim Orlovich 2005-04-12 17:51:21 UTC
Actually, never mind, I know of a nice way of testing it already
Comment 3 Maksim Orlovich 2005-04-16 16:05:22 UTC
Ugh. This is actually very hard to fix because of how the painting gets done, sorry.
Comment 4 Markus 2005-04-16 16:31:31 UTC
I have changed it a bit: I look wether a background-pixmap is set, if so, scale it up and use it, else fill it with the background color. But this origin-thing is not covered at all...
Comment 5 lexual 2010-01-23 05:58:55 UTC
Still relevant to recent KDE version?
If not please close the bug.

Thanks,

Lex.
Comment 6 Christoph Feck 2010-09-22 23:28:07 UTC
SVN commit 1178386 by cfeck:

Cleanup KLed

Code improvements:
* massive code reduction by using Qt gradients
* simplify cachedPixmap handling
* remove "builtin" benchmark

Bug fixes:
* fix background, now uses transparency
* fix cache not updated on look changes
* fix cache not updated on resize
* fix cropped appearance
* fix alignment inside margins

Visual improvements:
* use consistent bevelled borders
* use SmallIconSize as sizeHint
* use 0° degree light angle (same as Oxygen and many other styles)
* make border width relative to size

BUG: 98719
FIXED-IN: 4.6.0


 M  +100 -400  kled.cpp  
 M  +12 -0     kled.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1178386
Comment 7 Christoph Feck 2010-09-22 23:31:17 UTC
See http://reviewboard.kde.org/r/5369/