Network Monitor icons are horizontally stretched

Bug #57626 reported by Brent Core
72
Affects Status Importance Assigned to Milestone
human-icon-theme
Invalid
Undecided
Unassigned
gnome-netstatus (Ubuntu)
Fix Released
Undecided
Frank Schoep

Bug Description

On a fresh install of Edgy on my 1280x768 laptop, the signal-strength bars are horizontally stretched and there is a lot of white space on both sides of the signal-strength bars.

Revision history for this message
Brent Core (brentcore2) wrote :
Revision history for this message
Darren Hinderer (hindenburg) wrote :

I have 1400 x 1050 resolution and have the same problem with an up-to-date (time of this ticket) edgy.

Changed in gnome-netstatus:
status: Unconfirmed → Confirmed
Revision history for this message
Carlos Perelló Marín (carlos) wrote :

Same problem with 1024x768 resolution.

Revision history for this message
Joseph Price (pricechild) wrote :

Same problem with 1024x768 also

Revision history for this message
Stéphane Graber (stgraber) wrote :

Exactly the same with a widescreen 1280x800 display and the knot2 upgraded to the current version of Edgy.

Changed in gnome-netstatus:
assignee: nobody → desktop-bugs
Revision history for this message
Frank Schoep (frank-ffnn) wrote :

I'm willing to spend some time debugging this to see if it's caused by bad icons or other artwork related things. Unfortunately I don't have a wireless card on my system so I'd like to ask if there's a way to test the signal strength meter without a WLAN card.

Changed in gnome-netstatus:
status: Confirmed → In Progress
Revision history for this message
Darren Hinderer (hindenburg) wrote : Re: [Bug 57626] Re: Network Monitor Icons look stretched out on 1280x768 resolution

I don't know how to get the wireless icon up there if you don't have a
wireless card, but I think this is definitely an artwork related bug. I
found the problem icons and for each one when I right clicked them nautilus
could not read the image size information. It should read them as 24x24.

Here is where I found the icons:

/usr/share/icons/Human/24x24/status/network*png

/usr/share/icons/Human/24x24/apps/gnome-netstatus*png

If the panel can't read the size information from the image like nautilus
can't, you would imagine it would default to some big size like it's doing
now.

Revision history for this message
Darren Hinderer (hindenburg) wrote :

Sorry if I mislead anyone with my last response, but now that I've looked at
it some more it seems that the applet may just not support scalable icons
which is actually what it's using for the wireless icon. The icons from here
look fine:
/usr/share/icons/Human/24x24/status/network*png

I can slide a toolbar separator right up to its left edge. However the
wireless icon takes up equal amounts of huge space on both its sides.

The actual wireless icon is located here:
/usr/share/icons/Human/24x24/scalable/apps/gnome-netstatus*svg

Revision history for this message
Darren Hinderer (hindenburg) wrote :

More info:
Deleting /usr/share/icons/Human/scalable/apps/gnome-netstatus-75-100.svgmakes
everything look normal.

When it can't find the deleted icon, it defaults to:
/usr/share/icons/Human/48x48/apps/gnome-netstatus-75-100.png

On 9/20/06, Darren Hinderer <email address hidden> wrote:
>
> Sorry if I mislead anyone with my last response, but now that I've looked
> at it some more it seems that the applet may just not support scalable icons
> which is actually what it's using for the wireless icon. The icons from here
> look fine:
>
> /usr/share/icons/Human/24x24/status/network*png
>
> I can slide a toolbar separator right up to its left edge. However the
> wireless icon takes up equal amounts of huge space on both its sides.
>
> The actual wireless icon is located here:
> /usr/share/icons/Human/24x24/scalable/apps/gnome-netstatus*svg
>

Revision history for this message
Daniel Holbach (dholbach) wrote : Re: Network Monitor Icons look stretched out on 1280x768 resolution

I could imagine that gnome-netstatus' code expects the SVG to have similar brain-dead size information as the normal icons. Upstream icon has:

daniel@bert:~$ file /usr/share/icons/hicolor/48x48/apps/gnome-netstatus-75-100.png
/usr/share/icons/hicolor/48x48/apps/gnome-netstatus-75-100.png: PNG image data, 11 x 32, 8-bit/color RGBA, non-interlaced
daniel@bert:~$

(So 11x32 for a 48x48 icon.)

If somebody likes to investigate that, that'd be nice.

Changed in human-icon-theme:
assignee: desktop-bugs → ubuntu-art
Revision history for this message
David Planella (dpm) wrote :

Since this bug applies to not only resolutions of 1280x768, could the summary not be changed to something else?

Something in the lines of "Network Monitor icons look stretched out", for example?

Revision history for this message
Marius Gedminas (mgedmin) wrote :

Same problem here. Very irritating: I have many icons and little space on the top panel on my 1024x768 desktop, and now netstatus wastes most of the space I still had available for notification area icons.

I noticed that two of the 24x24 images (gnome-netstatus-0-24.png and gnome-netstatus-25-49.png) were 24x24 instead of 12x24, but I tried cropping them, updating the gtk icon cache and restarting the netstatus applet, with no difference in the output.

By the way, the all the 48x48 icons here are really 18x41.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

The problem is with the svg icons. Other icon themes have no problems. If I rename gnome-netstatus-[0-9]*.svn out of the way and rebuild the icon cache, there is no extra space around the signal strength icon, but the icon still doesn't look like it's supposed to: it is scaled with no regard to proportion (see the attached image).

BTW, I have cropped the two 24x24 icons to 12x24; I don't know if extra margins would appear if I hadn't cropped them.

Revision history for this message
Andrea Caminiti (nrayever) wrote :

wide icons here too!!

there's a problem with the gnome-network-applet. when a wireless network is choosed. the icon change size but to the wide.

can be solved?? is there going to be any patch??

nrayever

Revision history for this message
Marius Gedminas (mgedmin) wrote :

I get it now: gnome-netstatus takes the largest available icon and scales it vertically, without keeping the aspect ratio. See src/netstatus-icon.c, the code of netstatus_icon_scale_icons (passes retain_aspect=FALSE to scale_pixbuf when scaling signal icons) and netstatus_icon_lookup_icon_theme (passes 1000 as the desired size to gtk_icon_theme_lookup_icon to get the biggest one).

Revision history for this message
Andrea Caminiti (nrayever) wrote :

sorry my resolution is 1440x900

nrayever

Revision history for this message
Marius Gedminas (mgedmin) wrote :

Quick workaround: go to /usr/share/icons/Human and remove these files:

  ./scalable/apps/gnome-netstatus-0-24.svg
  ./scalable/apps/gnome-netstatus-25-49.svg
  ./scalable/apps/gnome-netstatus-50-74.svg
  ./scalable/apps/gnome-netstatus-75-100.svg

if you have a small panel you may also want to remove these files:

  ./48x48/apps/gnome-netstatus-0-24.png
  ./48x48/apps/gnome-netstatus-25-49.png
  ./48x48/apps/gnome-netstatus-50-74.png
  ./48x48/apps/gnome-netstatus-75-100.png

then run sudo gtk-update-icon-cache -f /usr/share/icons/Human and restart the netstatus applet (e.g. by running killall gnome-netstatus-applet).

Revision history for this message
Andrea Caminiti (nrayever) wrote : Re: [Bug 57626] Re: Network Monitor Icons look stretched out on 1280x768 resolution

Marius

may i ask you where is: src /netstatus-icon.c ?? it's a directory or file?

nrayever

----- Original Message ----
From: Marius Gedminas <email address hidden>
To: <email address hidden>
Sent: Sunday, October 1, 2006 5:33:15 PM
Subject: [Bug 57626] Re: Network Monitor Icons look stretched out on 1280x768 resolution

I get it now: gnome-netstatus takes the largest available icon and
scales it vertically, without keeping the aspect ratio. See src
/netstatus-icon.c, the code of netstatus_icon_scale_icons (passes
retain_aspect=FALSE to scale_pixbuf when scaling signal icons) and
netstatus_icon_lookup_icon_theme (passes 1000 as the desired size to
gtk_icon_theme_lookup_icon to get the biggest one).

--
Network Monitor Icons look stretched out on 1280x768 resolution
https://launchpad.net/bugs/57626

Revision history for this message
Justin Dugger (jldugger) wrote :

This bug is pretty similar to another one in gnome. The patch to Gnome bug 325149, while overly complex, almost works. The orientation setting inverted, but I imagine thats because the original author wanted it on the left side. Someone with a bit more familiarity with GTK+ wanna have a look?

Changed in human-icon-theme:
status: Unknown → Unconfirmed
Revision history for this message
Marius Gedminas (mgedmin) wrote :

Andrea: the source code of gnome-netstatus applet. You can download it by typing apt-get source gnome-netstatus.

Revision history for this message
Frank Schoep (frank-ffnn) wrote :

Everyone is wanting to assign this bug to me and I'm fine with that except for the fact that I can not test this myself and would be shooting in the dark when trying to resolve this. There have been suggestions for resolving this bug, so if someone can give me a way to fake a WLAN interface or work around it another way, I'll glady work on solving this.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

Frank: I found a way to spoof a wireless interface. Download the fake-wireless file (it's a copy of my /proc/net/wireless, with the eth1 entry duplicated as fake eth0 and lo entries), put it in /tmp, then run

   sudo mount --bind /tmp/fake-wireless /proc/net/wireless
   killall gnome-netstatus-applet

Now if you select 'eth0', 'eth1' or 'lo' in the applet ('lo' will always be available, even if you have no network cards), it will think this is is a wireless interface and show the signal strength bar.

You can open the /tmp/fake-wireless file in a text editor and change the link quality column manually to see the various signal strength icons. A value of 1 gives me 1 bar, a value of 5 gives me 2 bars, a value of 10 gives me 3 bars, and a value of 30 (or higher) all 4 bars.

When you're done, remove the spoofed file with

   sudo umount -l /tmp/fake-wireless
   killall gnome-netstatus-applet

a reboot will also remove the spoof.

Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Bug 57626] Re: Network Monitor icons are horizontally stretched

Yowser Marius that's a VERY cunning trick :-)

Revision history for this message
Frank Schoep (frank-ffnn) wrote :

Assigning to me, going to check Marius' trick and work towards a solution.

Changed in human-icon-theme:
assignee: ubuntu-art → frank-ffnn
Revision history for this message
Frank Schoep (frank-ffnn) wrote :

This patch makes the signal strength icons scale properly preserving the aspect ratio. Tested on horizontal and vertical panels with sizes ranging from 24 to 72 px, no oddness in scaling encountered. This should fix the problem the right way as far as I can tell.

Revision history for this message
Paul Sladen (sladen) wrote :

gnome-netstatus (2.12.0-5ubuntu5) edgy; urgency=low

  * Use aspect correct icon scaling (Closes: Malone: 57626)
    Thanks to Frank Schoep

 -- Paul Sladen <email address hidden> Thu, 05 Oct 2006 10:54:17 +0100

Changed in human-icon-theme:
assignee: frank-ffnn → sladen
status: In Progress → Fix Released
Changed in human-icon-theme:
status: Unconfirmed → Rejected
Revision history for this message
Marius Gedminas (mgedmin) wrote :

The icon is now scaled properly, but the margins are still somewhat off. Take a look at the attached image: the space between the network activity indicator and the wifi strength bar is larger than the space between adjacent applets.

Could you please strip the empty space from the sides of the svg?

Revision history for this message
Marius Gedminas (mgedmin) wrote :

Here's a screenshot with the GNOME theme, to demonstrate that the extra wide space comes from the artwork and not from the netapplet code

Revision history for this message
Frank Schoep (frank-ffnn) wrote :

OK, the problem is clear. I'll work on fixing the SVGs, expect the fixed ones to be uploaded in the next few days. Paul, I'm taking this bug back.

There is no status for "Fixing some more", so I chose "In Progress" again.

Changed in gnome-netstatus:
assignee: sladen → frank-ffnn
status: Fix Released → In Progress
Revision history for this message
Frank Schoep (frank-ffnn) wrote :

OK, to avoid confusion and multiple bug reports I'm setting this one to Fix Released, see bug #64269 for the changes to the icon theme.

Changed in gnome-netstatus:
status: In Progress → Fix Released
Revision history for this message
Florent Mertens (givre) wrote :

It seams that this bug come back today with the new gnome-netstatus

Changed in gnome-netstatus:
status: Fix Released → Unconfirmed
Revision history for this message
Florent Mertens (givre) wrote :

Ok, so it appears that the fix was dropped because it wasn't in a patch. enable frank patch fix the issue.
I provide a debdiff in case :

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

 gnome-netstatus (2.12.1-0ubuntu2) feisty; urgency=low
 .
   * debian/patches/03-use_aspect_correct_icon_scaling.patch :
      - Fix the icone scale issue. Was dropped in the last update.
      - Put it in a patch to avoid dropping it again.

Changed in gnome-netstatus:
status: Unconfirmed → Fix Released
Revision history for this message
Fernando Miguel (fernandomiguel) wrote :

I can it has reappeared on feisty
http://img.bugabundo.net/pub/network.png

Revision history for this message
Florent Mertens (givre) wrote :

Be sure that you have 2.12.1-0ubuntu2 it should fix it

Revision history for this message
Fernando Miguel (fernandomiguel) wrote :

[quote]
Be sure that you have 2.12.1-0ubuntu2 it should fix it[/quote] I do have the latest version under feisty.

Revision history for this message
Florent Mertens (givre) wrote :

Please give me the output of :
apt-cache madison gnome-netstatus-applet
remove and readd the applet and confirm that it works or not.
If it don't work, install
http://flomertens.keo.in/debian/gnome-netstatus-applet_false_i386.deb
remove and readd the applet and confirm that it works or not.

Thanks

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.