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

Thread: Changing icon size in Unity 2d Ubuntu 12.04

  1. #1
    Join Date
    Mar 2006
    Location
    Canada, Chile
    Beans
    116
    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,186

    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
    116
    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,186

    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
    116
    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
    116
    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
    May 2008
    Beans
    7

    Re: Changing icon size in Unity 2d Ubuntu 12.04

    It works, thanks!
    (Really now, I can't imagine why the big, fat icons are the default size...)

  8. #8
    Join Date
    Jul 2006
    Beans
    4,860

    Re: Changing icon size in Unity 2d Ubuntu 12.04

    Not to intrude, but is this behavior expected to remain even on final release? Or are the icons supposed to gain resizable functionality?

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

    Re: Changing icon size in Unity 2d Ubuntu 12.04

    New files again today (yesterday?), line numbers are now

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

    (editorial comment)

    I don't get why the default size is so big, either. On a vertical bar on a short / wide screen they are so big that one is soon into scrolling the launcher. They are much bigger than icons in any application I can think of, too - imagine if the icons in Firefox or LibreOffice were that big!

    On the topic of being able to change them in the Settings menu, I recall reading somewhere (a bug, maybe) that this ability is not coming before 12.10, which is what prompted me to figure out this work-around.

    I'm still looking for a solution to make the workspace selector icon fit better, and also a solution to make the icons in the dash smaller and take up less room...
    C'est ma façon de parler.

  10. #10
    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.

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
  •