Hello all;

I have an older Toshiba laptop which will not run Unity 3d and is right now letting me try out 12.04.

I spent some time this weekend figuring out how to edit the .qml files to allow a smaller set of icons and therefore more of them in the launcher, and I thought I'd offer the changes here for anyone else interested.

Note that there is the possibility of screwing up the Unity 2d environment by editing the .qml files so if you decide to try this, you should make a backup (copy the files in question with a different name before you edit, for example) and of course be very careful!

You have to be comfortable with editing files as superuser. Personally I prefer to use the terminal, shell and vi. You may prefer a different set of alternatives.

Also, some of the line numbers below could change as the beta process continues, so don't just blindly make changes; take a look at what you are changing to ensure that it makes sense! (this is why this is not posted as a patch)

First, all of the .qml files live in /usr/share/unity-2d/shell. You will change three files, as follows.

In that directory you will see a file called "Shell.qml". In it you will adjust the width of the launcher, by changing line 47, which looks like

width: 65
to look like

width: 50
Then in the subdirectory "common", you will see a file called "IconTile.qml". In it you will adjust the width and height of the main icon of the tile, by changing lines 71 and 72, which look like

sourceSize.width: 48
sourceSize.height: 48
to look like

sourceSize.width: 32
sourceSize.height: 32
Finally, in the subdirectory "launcher", you will see a file called "LauncherList.qml". In it you will adjust the tile size by changing line 30, which looks like

property int tileSize: 54
to look like

property int tileSize: 38
and also the selection outline size by changing line 34, which says

property int selectionOutlineSize: 65
to say

property int selectionOutlineSize: 50
Now you need to check, and possibly change, one last thing. In the same "launcher" directory, examine line 250 in the file "LauncherItem.qml". If it looks like

width: 32
you are good to go. On the other hand, it may show a width of some other (larger?) number. If so, change it to 32. The reason I am uncertain about this is that I was experimenting with a Unity editing tool before I rolled up my sleeves and dived in here and I think it may have changed this line for me.

That's it. You now need to restart Unity-2d e.g. by logging out and logging back in again.

The only thing that is not quite right in this configuration is the workspace chooser icon which is a bit fat for its button.

If for some reason this doesn't work for you, I'd be interested in finding out what happened. And remember, those backup versions of the .qml files you edited...