[vlc-devel] [PATCH] Qt: get window icon from theme (falling back to existing pixmap)

Philip Sequeira phsequei at gmail.com
Sat Jun 22 13:59:51 CEST 2013


On Friday, 21 June 2013 14:44:20 Rémi Denis-Courmont wrote:
> Le mercredi 19 juin 2013 13:04:04, Philip Sequeira a écrit :
> > This patch will try to get the appropriate icon from the icon theme, and
> > fall back to the current pixmap if that fails. This way, it'll use the
> > better icon that already ships with VLC, at all sizes available, and if
> > the user's theme includes a replacement VLC icon, that'll be used instead
> > (which was the object of ticket #6857, AFAICT).
> 
> Tested (KWin) and merged, thanks.

I see that Ludovic Fauvet implemented this for the system tray as well, which 
I forgot. However, maybe we should take it one step further there, and look 
for an icon specifically for the panel. That seems to be what was wanted here: 
https://bugs.launchpad.net/ubuntu/+source/vlc/+bug/530797

This way a theme could have a normal "vlc" icon that gets used for the window, 
but a different "vlc-panel" icon that gets used for the system tray (for 
example, a monochrome version was mentioned in the aforementioned launchpad 
thread). If the theme doesn't provide a special icon for the panel, the "vlc" 
icon is tried, and then finally the fallback. When the Xmas joke is active, it 
looks for a "vlc-panel-xmas" icon before trying the normal panel icon, then 
the normal xmas icon, then the (xmas) fallback. A patch for this behavior is 
attached.

Also, somewhat related, but please let me know if this is the wrong place for 
this discussion: Is there any interest in using theme icons for (some of) the 
UI icons as well? It would be trickier than with the window/tray, as VLC uses 
several icons that aren't theme standards; I'm not sure what could be done 
about that, as mixing theme icons with custom ones might look even worse. 
Still, some of the current icons look pretty bad against dark backgrounds (the 
ones in the menus especially), and may not fit in with whatever style the rest 
of the user's desktop is. Basically, I'm just wondering if there's any specific 
reason for not using theme icons, or if it's just something no one has 
bothered to do.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Qt-look-for-panel-specific-theme-icons-for-system-tr.patch
Type: text/x-patch
Size: 1451 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20130622/b0a139c7/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20130622/b0a139c7/attachment.sig>


More information about the vlc-devel mailing list