Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: Changing icon size in Unity 2d Ubuntu 12.04

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Location
    Canada, Chile
    Beans
    108
    Distro
    Ubuntu 13.04 Raring Ringtail

    Changing icon size in Unity 2d Ubuntu 12.04

    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

    Code:
    width: 65
    to look like

    Code:
    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

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

    Code:
    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

    Code:
    property int tileSize: 54
    to look like

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

    Code:
    property int selectionOutlineSize: 65
    to say

    Code:
    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

    Code:
    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...
    C'est ma façon de parler.

  2. #2
    Join Date
    Feb 2009
    Location
    USA
    Beans
    3,187

    Re: Changing icon size in Unity 2d Ubuntu 12.04

    I thought in 12.04 you can change the Icon size from the Desktop menu. Right-click on the desktop and try to change the wallpaper, you should have an option for the Unity icons. Does this work for Unity 3D only?

  3. #3
    Join Date
    Mar 2006
    Location
    Canada, Chile
    Beans
    108
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Changing icon size in Unity 2d Ubuntu 12.04

    Quote Originally Posted by 3Miro View Post
    I thought in 12.04 you can change the Icon size from the Desktop menu. Right-click on the desktop and try to change the wallpaper, you should have an option for the Unity icons. Does this work for Unity 3D only?
    The size-changing is only offered, and only works in any case, in Unity 3D.

    There are some similar instructions to mine "out there" for earlier versions but it seems Unity 2D is pretty fluid and fast moving. I sort of feel like looking at Unity 2D on 11.10 to see if I can get that working too but only sort of.
    C'est ma façon de parler.

  4. #4
    Join Date
    Feb 2009
    Location
    USA
    Beans
    3,187

    Re: Changing icon size in Unity 2d Ubuntu 12.04

    Quote Originally Posted by bonzini View Post
    The size-changing is only offered, and only works in any case, in Unity 3D.

    There are some similar instructions to mine "out there" for earlier versions but it seems Unity 2D is pretty fluid and fast moving. I sort of feel like looking at Unity 2D on 11.10 to see if I can get that working too but only sort of.
    I thought they had them both finally, I guess not. Thanks for the info.

  5. #5
    Join Date
    Mar 2006
    Location
    Canada, Chile
    Beans
    108
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Changing icon size in Unity 2d Ubuntu 12.04

    Updated QML files arrived today, and some changes in line numbers.

    The change in Shell.qml is now line 72.

    The change in common/IconTile.qml remains the same.

    The changes in launcher/LauncherList.qml are now on lines 31 and 35.

    That seems to be it.
    C'est ma façon de parler.

  6. #6
    Join Date
    Mar 2006
    Location
    Canada, Chile
    Beans
    108
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Changing icon size in Unity 2d Ubuntu 12.04

    A new set of QML files today; here are the line numbers:

    Shell.qml: line 75
    common/IconTile.qml: lines 71,72
    launcher/LauncherList.qml: lines 31,35

    Seems to continue to work fine.
    C'est ma façon de parler.

  7. #7
    Join Date
    Mar 2005
    Location
    Lancashire, NW England UK
    Beans
    169
    Distro
    Lubuntu 13.04 Raring Ringtail

    Re: Changing icon size in Unity 2d Ubuntu 12.04

    Thank you SO much for this. My major hate for Unity was focussed on me not being able to change the stupidly ginormous icons on my 19" (non-widescreen) monitor.

    There are other things . . . but another time.

    Quote Originally Posted by bonzini View Post

    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

    Code:
    width: 32
    This was set to 32 already in my plain vanilla precise pangolin, and now appears on line 259 for those who wish to check.

    Now I can patiently await development of the nVidia driver for my nine year old FX5200 silent video card. I have no need for super fast graphics, but so wish I could run the Unity 3D version so that things "just work".

    Thanks for you help!
    Momist. Follower of the minor Greek god Momer.

  8. #8
    Join Date
    May 2012
    Beans
    2

    Re: Changing icon size in Unity 2d Ubuntu 12.04

    Thanks a lot guys. It works. Have changed the icons to a smaller and still usable size.
    I am using 12.10 LTS (the beta version but with updates). According to the help in documentation, one can change launcher icon size via System Settings/Appearance. I tried it but there was no icon size sliding bar in my Appearance setting. Anyone using 12.10 and find this feature absent?

  9. #9
    Join Date
    Feb 2009
    Beans
    78

    Re: Changing icon size in Unity 2d Ubuntu 12.04

    Quote Originally Posted by wolfie25 View Post
    Thanks a lot guys. It works. Have changed the icons to a smaller and still usable size.
    I am using 12.10 LTS (the beta version but with updates). According to the help in documentation, one can change launcher icon size via System Settings/Appearance. I tried it but there was no icon size sliding bar in my Appearance setting. Anyone using 12.10 and find this feature absent?
    I guess you mean 12.04.

    But I fully agree to your posting - Google points out that there should be a slider on the "appearance settings" panel to control the launcher icon size.

    I just installed 12.04 in a virtual machine - and this slider is not there.
    I tried the old fashioned way: installing compiz config manager; and there is an entry in the ubuntu desktop plugin page for that icon size ... but this setting doesnt have any effect.

    So, how the f**##!! does one reduce the insane icon size of the launcher? And what on earth where the unity folks thinking here?

  10. #10
    Join Date
    Dec 2007
    Location
    Bombay
    Beans
    6,353
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Changing icon size in Unity 2d Ubuntu 12.04

    @bonzini, your instructions worked perfectly. Thanks for figuring all this out for us at the cost of a weekend!

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •