Bug 187781 - amarok2 osd: make only background transparent
Summary: amarok2 osd: make only background transparent
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Notifications (show other bugs)
Version: 2.1-SVN
Platform: openSUSE Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-21 11:54 UTC by Thomas Kamps
Modified: 2024-04-01 17:58 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Modified OSD with only background transluent (8.18 KB, application/x-compressed-tar)
2009-05-15 22:55 UTC, Thomas Kamps
Details
Pacth to make osd with only backgoudn transparency (1.77 KB, patch)
2009-05-16 09:41 UTC, Thomas Kamps
Details
Advanced patch for translucent Osd (19.23 KB, patch)
2009-05-16 11:06 UTC, Thomas Kamps
Details
OSD Patch should compile with Qt 4.4 (19.75 KB, patch)
2009-05-17 11:45 UTC, Thomas Kamps
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Kamps 2009-03-21 11:54:30 UTC
Version:            (using KDE 4.2.1)
Installed from:    SuSE RPMs

When the tranparency of the osd in amarok2 ist aktive, the whole osd gets transluency. But it would be nice, if only the background gets transluency and the rest is full opaqued.
Sine QT4.5 supports top-level transparency, it should be very easy to realise it with QT4.5.
Comment 1 Mark Kretschmann 2009-03-21 12:08:42 UTC
I agree with this in theory, but in reality (at least on my system) the text almost appears opaque; I don't notice any readability issues with it.

However, in general I agree that your suggestion could make sense. We could experiment with it at least.
Comment 2 Thomas Kamps 2009-05-15 22:55:41 UTC
Created attachment 33699 [details]
Modified OSD with only background transluent

I have mad a small modification on the OSD code. Now only the Background is transluent. For usins Qt 4.5+ is required.
Still it has one problem: When transluency is active, the Preview-OSD does not appear at all. (It ist not even invisible!). When starting amarok with a non transluent OSD, you can see the prewiew. but when you activate transluency it disappears, and does not come back. (Until you start amarok with a non transluent OSD). Perhaps, you unterstand, why it behaves so.
Comment 3 Seb Ruiz 2009-05-16 08:34:25 UTC
Hi Thomas,
Thanks for the patch - but you'll need to attach it as a diff rather than the two files you've modified. This way we can see exactly what you've changed.

You can generate the patch using the command `svn diff > osd_patch.diff`, which you can then upload here (don't paste it into the comment box).
Comment 4 Thomas Kamps 2009-05-16 09:41:46 UTC
Created attachment 33706 [details]
Pacth to make osd with only backgoudn transparency

See comment from me above.
Comment 5 Thomas Kamps 2009-05-16 11:06:37 UTC
Created attachment 33709 [details]
Advanced patch for translucent Osd

This patch is advanced to the old one:
+You can set tranlucency-level in the config
+You see preview with translucent Osd

Problems:
-Translucent-bool (true -> false) is not applied to preview. You need to reload the config. The other direction works.
-Needed to set the parent für preview to 0

Overall Osd-problem:
All changes to Osd need a restart of amarok to get applied.
Comment 6 Mark Kretschmann 2009-05-16 12:01:11 UTC
SVN commit 968577 by markey:

On Screen Display settings are now immediately applied, without
requiring an application restart.

CCBUG: 187781

 M  +2 -0      ChangeLog  
 M  +2 -0      src/configdialog/dialogs/OsdConfig.cpp  
 M  +2 -0      src/widgets/Osd.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=968577
Comment 7 Seb Ruiz 2009-05-17 08:58:11 UTC
Yo Thomas -
Thanks for the patches. We can't include them in Amarok 2.1 because of the string freeze which we are currently in. I'd like to get this included in Amarok 2.1.1 though, which should be released shortly after 2.1.

There are a few improvements which are desirable for your patch first though:
1. Your patch must compile with Qt 4.4 - we cannot bump to Qt 4.5.
It would be okay to simply revert to the old behaviour of setWindowOpacity() with 4.5, and continue to use setAttribute() when compiled/running against Qt 4.5.

2. Why did you give OSD preview widget no parent? You totally disregarded the comment here!
-    m_osdPreview = new OSDPreviewWidget( this ); //must be child!!!
+    m_osdPreview = new OSDPreviewWidget( 0 ); //must be child!!!
Comment 8 Thomas Kamps 2009-05-17 10:43:09 UTC
The preview OSD did not get a parent, because, if it has a parent and the QT::WA_TranslucentBackground attribute is set, it disappears.
If you find a solution for the disappearing-problem without a null-parent for the preview, it would be nice.
Comment 9 Thomas Kamps 2009-05-17 11:45:59 UTC
Created attachment 33757 [details]
OSD Patch should compile with Qt 4.4

This patch should compile with Qt 4.4 can anyone test it?
Comment 10 Bug Janitor Service 2024-03-29 19:37:43 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/amarok/-/merge_requests/73
Comment 11 Tuomas Nurmi 2024-04-01 17:58:23 UTC
Git commit 3f6799c84c694246ae8a80c513828d42b7c5701b by Tuomas Nurmi.
Committed on 30/03/2024 at 11:04.
Pushed by nurmi into branch 'master'.

Make only OSD background translucent, keep text and images opaque

M  +2    -1    ChangeLog
M  +6    -2    src/widgets/Osd.cpp
M  +3    -3    src/widgets/Osd.h

https://invent.kde.org/multimedia/amarok/-/commit/3f6799c84c694246ae8a80c513828d42b7c5701b