Folder icons in 'Human' theme are huge

Bug #46219 reported by Chris Lord
120
Affects Status Importance Assigned to Milestone
ubuntu-artwork (Ubuntu)
Fix Released
High
Daniel Holbach

Bug Description

A recent update to ubuntu-artwork has made folder icons when using the 'Human' theme huge.
This isn't consistent; document icons and the open-folder icon are still the normal size, which leads to odd behaviour when dragging a document into a folder. Affects folder and disk icons at small (75%) zoom level only.

Revision history for this message
Chris Lord (cwiiis) wrote : Screenshot illustrating the odd behaviour

Screenshot illustrating the odd behaviour

Changed in ubuntu-artwork:
status: Unconfirmed → Confirmed
description: updated
Revision history for this message
Matthew East (mdke) wrote :

Yeah, confirmed. Daniel, no doubt you'll see this pretty quickly, but just in case you don't, I'm assigning it to you.

Changed in ubuntu-artwork:
assignee: nobody → dholbach
Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Bug 46219] Re: Folder icons in 'Human' theme are huge

Interesting, this must be related to the new SVG icons, but I don't see
this behaviour.

Revision history for this message
Mark Shuttleworth (sabdfl) wrote :

Ah, OK, it shows up when you zoom in a little. I think the SVG icons are
set to size 128x128. At least, I see a line or two like this inside the
icon:

<svg version="1.1" id="Layer_1" xmlns="&ns_svg;"
xmlns:xlink="&ns_xlink;" width="128" height="128" viewBox="0 0 128 128"
    style="overflow:visible;enable-background:new 0 0 128 128;"
xml:space="preserve">

We have 24x24 and 48x48 PNG versions of that icon. I'm guessing that for
some reason, when you zoom in past 48x48 it jumps to 128x128 svg when
what we *really* want is for the icon to switch to the SVG version at
49x49 and upwards.

Jeff, Daniel, any suggestions?

Revision history for this message
James Henstridge (jamesh) wrote :

This problem should be solvable by editing the /usr/share/icons/Human/index.theme file. Currently it contains the following:

[scalable/filesystems]
Size=48
Context=filesystems
Type=Scalable
MinSize=32
MaxSize=256

So the icon theme code thinks that icons in that directory have a nominal size of 48 pixels. Since they are actually 128x128, they appear about 2.5 times larger than other icons.

There are two possible fixes:
1. edit index.theme and set the nominal size of icons in scalable/filesystems to 128 pixels.
2. edit the SVG files so that they are 48x48 pixels.

I've tried (1) locally and it fixes the problem for the folder icons. I haven't checked the scalable icons in the other directories, so it is possible that some of the other sections in index.theme to make sure that they match.

Revision history for this message
James Henstridge (jamesh) wrote :

Looks like the change is needed for the [scalable/devices] section too. The other directories under scalable/ don't contain any icons so don't really matter right now, but it might be worth changing them to Size=128 too if you are going to use 128x128 for all new scalable icons.

Revision history for this message
Daniel Holbach (dholbach) wrote :

I'll add that in the next upload.

Changed in ubuntu-artwork:
status: Confirmed → Fix Committed
Revision history for this message
Mark Shuttleworth (sabdfl) wrote :

Thanks for the analysis James. Can you tell me, if we tell the
index.theme that our scalable ones are at 128x128, will it still use the
SVG's if it needs to say produce a 49x49 icon? There must be some
threshold at which it is better to scale the SVG *down* than to scale
the 48x48 PNG image *up*. How do we tell the icon system what that
threshold is?

Revision history for this message
Removed by request (removed30301) wrote :

P.S. : this bug is duplicate of #46127 and #46132 :-/
I think It will be interesting to mark them fixed.

Revision history for this message
James Henstridge (jamesh) wrote :

Mark: yes. The icon theming code uses the nominal size to work out a scaling factor for the icon.

So with the existing Size=48 setting, it would use a scaling factor of 49/48 (102%), so render the icon at 130px.

With Size=128, it would instead use a scaling factor of 49/128 (38%) and render the icon at 49px.

The range of icon sizes at which the SVG icon is used is covered by a different set of keys in the index.theme: MinSize and MaxSize. So in the case of the Human theme, the SVG folder icon will be used for any sizes from 32px to 256px that are not covered by a bitmap icon.

Revision history for this message
DigitalFox (silenturbanfox-gmail) wrote :

Additionally, it looks like the menu icons have been slightly enlarged. Of course, I may just be seeing things, or Human was always slightly larger than other iconsets on the menu and I only noticed after seeing the folder bug.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Fixed in ubuntu-artwork 24.

Changed in ubuntu-artwork:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.