patch: don't flash the osd preview when opening the configure dialog

Andreas Heider andreas at meetr.de
Sat Apr 4 11:09:33 CEST 2009


Hi,

I'm a cs student with some time to spare and i'd love to have Amarok  
in a usable state on mac os x so i decided to see if I can help a bit  
with it.

This is my first bug, since I didn't find it on the bugtracker and I'm  
not sure if its better to open a new bug directly with the patch or  
post it to the mailing list i decided to do it here. Please give me a  
hint if I'm doing something the wrong way.

When opening the configure dialog the osd preview widget is shown for  
a short time before the dialog appears. On a fast computer this is  
barely visible, but it annoyed me.

This happens because the preview has to be resized with in an  
overwritten show() method. But this show() isn't called when the  
signal/slots mechanism calls setShown when the "Use On-Screen-Display"  
combobox emits it's signal, because show isn't virtual in QWidget  
(inline void show() { setVisible(true); }).
Also, the QT documentation prefers setVisible to setShown.

In the old version, to resize it anyway show() was called in the  
constructor of OSDPreview and later hidden.

I moved the resize logic to the virtual setVisible and removed the  
overwritten show. Instead of calling show(text, image) in the  
constructor, I changed it to set the text/image directly and omit the  
show.

Andreas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: osd.patch
Type: application/octet-stream
Size: 3100 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/amarok-devel/attachments/20090404/9c216236/attachment-0001.dll 
-------------- next part --------------



More information about the Amarok-devel mailing list