Issue 1057

277 views
Skip to first unread message

terdon

unread,
Feb 14, 2011, 10:33:33 AM2/14/11
to clementi...@googlegroups.com
Hi all, this is about Issue 1057, clementine cannot deal with certain icon themes. Apparently, these themes do not have the directory structure that clementine expects. This is a bit of a problem for me since I really don't want to change my icons and general desktop feel for the benefit of a single application. Even if it is the best music player I have tried in years.

In the relevant issue page, someone said that the problem is with the theme. I don't think that is fair though. I have this problem with both eleGANT and Buuf iconsets. Both are quite popular and standardized. More importantly, the only application that has problems with these themes is clementine so I don't think it is fair to blame the theme. I understand that these themes may be using an older directory schema but if ALL other applications can deal with it why not clementine?

Given the wonderful work the clementine devs have done and the high quality software they have produced, I feel kinda bad asking for this kind of detail but it really is a problem for me. Have a look at these screenshots and you will understand why:

  http://img403.imageshack.us/img403/3930/clementinescreenshot.png

So, can someone tell me exactly what clementine expects to find in the ./icons folder? I would be happy to fix it or provide a script to modify the folder (if possible).

David Sansome

unread,
Feb 14, 2011, 6:26:57 PM2/14/11
to clementi...@googlegroups.com
Hi,

You're right I should have looked into that a little more. It's a bug
in Qt - when it loads icons from system icon themes it only provides
the exact sizes that the theme has. So if the theme only has a set of
128x128 icons (like the eleGANT theme does) it will only provide icons
at exactly 128x128, and won't scale them down to 22x22 (or whatever)
to fit in the places that they're used.

I've fixed the bug in Qt and submitted it upstream, you can track what
happens to it here: http://qt.gitorious.org/qt/qt/merge_requests/2566

In the mean time you can work around the bug by creating 22x22, 32x32
and 48x48 versions of all the icons in the theme. Here are some
commands to do the 22x22 ones:

cd eleGANT/128x128
find -type d -exec mkdir -p ../22x22/{} ';'
find -xtype f -exec convert -resize 22x22 {} ../22x22/{} ';'

David

terdon

unread,
Feb 15, 2011, 9:40:45 AM2/15/11
to clementi...@googlegroups.com
Hi, David, thanks but your fix doesn't seem to work for me. Tried with both buuf and eleGANT and can see no difference in clementine. Did it work for you?

Bear in mind that there seem to be two problems here. One is the huge watermark-like icons in the menus and sidebar. Another, and the real problem for me, is the next, previous, play/pause, and stop as well as the buttons on top of the playlist. These are completely illegible (see http://img403.imageshack.us/img403/3930/clementinescreenshot.png ) so I have to hover the mouse to see the tooltip in order to use the buttons. This does not seem to be a scaling problem. What icons is clementine attempting to fetch here? In any case, neither behaviour was fixed by your trick. 
This is the exact command I ran, am I doing something wrong?

cd ~/.icons/eleGANT/
for n in 22 32 48; do find -type d -exec mkdir -p ../$n"x"$n/{} ';' ; find -xtype f -exec convert -resize $n"x"$n {} ../$n"x"$n/{} ';' ; done


The icons and dirs seem to be created correctly.

terdon

unread,
Feb 15, 2011, 10:28:53 AM2/15/11
to clementi...@googlegroups.com
Right, fixed it! The problem seems to be that clementine expects the theme to have directories in this format:

theme_name/category/size

So, for example:
Buuf/actions/32

So, to change the eleGANT theme to something that clementine can work with I did the following:

cd ~/.icons/eleGANT/128x128/
for n in 22 32 48; do find -type d -exec mkdir -p ../$n/{} ';' ; find -xtype f -exec convert -resize $n {} ../$n/{} ';' ; done
mv ../128x128/ ../128; mv ../36x36/ ../36; 
for n in $(/bin/ls); do mkdir ../$n; for k in 128  22  32  36  48 ; do mkdir ../$n/$k; mv ../$k/$n/* ../$n/$k; rm -rf ../$k/; done; done


It is not particularly elegant (no pun intended) but it works. Ignore the error messages.  

terdon

unread,
Feb 15, 2011, 1:09:13 PM2/15/11
to clementi...@googlegroups.com
Ummm... sorry, spoke too fast. Actually the commands from my last post break the theme. Gnome then reverts to the default theme which displays clementine correctly. So, please ignore my last post and sorry for the mistake...

terdon

unread,
Feb 15, 2011, 1:29:24 PM2/15/11
to clementi...@googlegroups.com
I am really sorry about spamming everyone but on the off chance that other people are actually interested here is how I finally fixed the damn thing:

cd ~/.icons/eleGANT/128x128/
for n in 22 32 48; do find -type d -exec mkdir -p ../$n/{} ';' ; find -xtype f -exec convert -resize $n {} ../$n/{} ';' ; done
for n in $(/bin/ls); do for k in 22 32 36 48 128 ; do mkdir -p ../$n/$k"x"$k; done ; done
for n in $(/bin/ls); do for k in 128x128  22x22  32x32  36x36  48x48; do cp -rvL ../$k/$n/* ../$n/$k; done ; done

After running the above commands, you must edit the eleGANT/index.theme file and add the appropriate entries for each of the new directories. So, at the end of the file add an entry like this for each of the directories and sizes created:

[actions/22x22]
Size=22
Context=Actions
Type=fixed

The easiest way is to copy them over from another index.theme file. Feel free to email me if you have any trouble. This is basically David's fix but I had not realized that I should, obviously enough, also edit the theme index.  
Reply all
Reply to author
Forward
0 new messages