Bug 306638 - Tooltips are translucent, but their bg isn't blurred
Summary: Tooltips are translucent, but their bg isn't blurred
Status: RESOLVED FIXED
Alias: None
Product: Oxygen
Classification: Plasma
Component: general (show other bugs)
Version: 4.9
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-11 21:07 UTC by Ruslan Kabatsayev
Modified: 2013-01-16 12:24 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot (79.35 KB, image/png)
2012-09-11 21:08 UTC, Ruslan Kabatsayev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ruslan Kabatsayev 2012-09-11 21:07:46 UTC
With some color schemes oxygen tooltips look not good enough because of being translucent yet not having bg blur.

Reproducible: Always

Steps to Reproduce:
1. Set some color scheme with light tooltips background
2. Hover mouse cursor over an item in system settings
3. See text behind tooltip interfere with text in tooltip
Comment 1 Ruslan Kabatsayev 2012-09-11 21:08:00 UTC
Created attachment 73841 [details]
Screenshot
Comment 2 Hugo Pereira Da Costa 2012-09-17 09:08:51 UTC
Git commit f2ba595d1e3439723c4e71e4ae2a4722f553b03e by Hugo Pereira Da Costa.
Committed on 17/09/2012 at 11:00.
Pushed by hpereiradacosta into branch 'master'.

Added blur behind transparent tooltips.

M  +1    -0    kstyles/oxygen/CMakeLists.txt
A  +303  -0    kstyles/oxygen/oxygenblurhelper.cpp     [License: BSD X11 (BSD like)]
A  +180  -0    kstyles/oxygen/oxygenblurhelper.h     [License: BSD X11 (BSD like)]
M  +5    -0    kstyles/oxygen/oxygenstyle.cpp
M  +8    -0    kstyles/oxygen/oxygenstyle.h

http://commits.kde.org/kde-workspace/f2ba595d1e3439723c4e71e4ae2a4722f553b03e
Comment 3 Hugo Pereira Da Costa 2012-09-17 09:10:40 UTC
Fixes it (in master).
Will not backport as I consider it more a feature than a bug (although arguable)
Now we also need to do the same with oxygen-gtk ;)
Comment 4 Ruslan Kabatsayev 2012-09-17 18:32:38 UTC
Great. If you agree, I can push the oxygen-gtk patch you've looked at as it is now, and then, when I have enough time, move this thing to a separate engine along with XShape/alpha code to better match oxygen-qt code organization (addressing your comment).
So, should I push?
Comment 5 Hugo Pereira Da Costa 2012-09-17 18:41:39 UTC
@Ruslan,
yes, push (both master and gtk3) 
I can help move it to engine too some day if u want.
Comment 6 Ruslan Kabatsayev 2012-09-17 19:43:05 UTC
Git commit b19661b56f983fc720fae0fb221a5ee294d62ded by Ruslan Kabatsayev.
Committed on 17/09/2012 at 21:42.
Pushed by kabatsayev into branch 'master'.

Add blur behind transparent tooltips

M  +24   -0    src/oxygenstyle.cpp
M  +6    -0    src/oxygenstyle.h
M  +13   -6    src/oxygenstylewrapper.cpp

http://commits.kde.org/oxygen-gtk/b19661b56f983fc720fae0fb221a5ee294d62ded
Comment 7 Ruslan Kabatsayev 2012-09-17 20:24:59 UTC
Git commit 853ecdaf4bc7f8327ce92c93b6b2f1a87146213a by Ruslan Kabatsayev.
Committed on 17/09/2012 at 22:25.
Pushed by kabatsayev into branch 'gtk3'.

Add blur behind transparent tooltips

M  +24   -0    src/oxygenstyle.cpp
M  +6    -0    src/oxygenstyle.h
M  +13   -5    src/oxygenthemingengine.cpp

http://commits.kde.org/oxygen-gtk/853ecdaf4bc7f8327ce92c93b6b2f1a87146213a
Comment 8 Ruslan Kabatsayev 2012-09-17 20:25:34 UTC
OK, now all three toolkits are supported by the fix.
Comment 9 Kai Uwe Broulik 2012-09-18 08:56:18 UTC
Does this conflict with Dolphin that manually adds a blur effect for tooltips in 4.9?
Comment 10 Hugo Pereira Da Costa 2012-09-18 10:36:10 UTC
@Kai 
Nope, no conflict, since their both using the same "API" (XProperty passed to kwin).
Now it does create some overhead (the style and the application both setting XProperties). Not even sure which one sets it first.
So that the question is: who should set the property ? App, or Style ? 
I'd vote for the style (of course ;)), notably because tooltip rendering is delegated by kwin to the style, and because some style (e.g. plastique) do not implement transparency. For those, it is irrelevant to set a blur area, but dolphin does not know about it (whereas the style does).
My two-cents. No big deal as long as there is no conflict.

cheers,

Hugo
Comment 11 Christoph Feck 2012-09-18 11:22:27 UTC
> So that the question is: who should set the property ? App, or Style ? 

If I remember correctly, Dolphin explicitely sets transparency, even if the style does not. In that case, Dolphin is right to request background blur.
Comment 12 Hugo Pereira Da Costa 2012-09-18 11:26:25 UTC
@Christoph:
http://wstaw.org/m/2012/09/18/plasma-desktopEG4856.png
That's dolphin + plastique + tooltip
No transparency (unless I missed some configuration option)
I think it has moved back and forth over time, though.

Also: systemsettings uses some very similar tooltips as dolphin (I actually think the code is basically the same, copied) but does not set blur (inside the app). that's another reason (IMO) to let the style deal with it ... 

Cheers 

Hugo
Comment 13 Hugo Pereira Da Costa 2013-01-16 12:24:08 UTC
Git commit 6f18cb4a652250f69dcf563b90fd442c26799d0f by Hugo Pereira Da Costa, on behalf of Ruslan Kabatsayev.
Committed on 17/09/2012 at 21:42.
Pushed by hpereiradacosta into branch 'master'.

Add blur behind transparent tooltips

M  +24   -0    src/oxygenstyle.cpp
M  +6    -0    src/oxygenstyle.h
M  +13   -6    src/oxygenstylewrapper.cpp

http://commits.kde.org/oxygen-gtk/6f18cb4a652250f69dcf563b90fd442c26799d0f