[Digikam-users] Re: Background of Tooltips transparent

Marcel Wiesweg marcel.wiesweg at gmx.de
Sun Oct 3 15:50:14 BST 2010


> Marcel,
> are you sure this is fixed?

Yes - at least for my environment. I've tested both branches.
The discussion is at
https://bugs.kde.org/show_bug.cgi?id=250265
There are screenshots how it looks for me.

The important part is 
p.drawPrimitive(QStyle::PE_PanelTipLabel, opt);
in paintEvent, which draws the same background as all "normal" tooltips have 
as well - code is taken from QToolTipLabel.
Previously, we painted nothing, and at least with KDE 4.5, a tooltip is a 
translucent window.
setFrameStyle(QFrame::StyledPanel); is also important I think.
I'm not sure about the impact of the setForegroundRole/setBackgroundRole calls 
in the constructor, as well as the call to setPalette(QToolTip::palette()); 

For me, the tooltip is also colored according to the current palette when I 
change the (digikam) theme or the KDE color theme (did not test the latter 
because it crashes KWin here ;-) )

Marcel



More information about the Digikam-users mailing list