Distorted blurry battery indicator in gnome-shell (using ubuntu-mono icons at default low-DPI scale 1.0)

Bug #1693155 reported by fcole90
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu UX
Fix Committed
Undecided
Unassigned
Ubuntu theme
Fix Released
High
Daniel van Vugt
gnome-shell (Ubuntu)
Won't Fix
Undecided
Unassigned
ubuntu-themes (Ubuntu)
Fix Released
High
Daniel van Vugt

Bug Description

My battery indicator looks blurry

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: light-themes 16.10+17.10.20170518-0ubuntu1
ProcVersionSignature: Ubuntu 4.10.0-20.22-generic 4.10.8
Uname: Linux 4.10.0-20-generic x86_64
ApportVersion: 2.20.5-0ubuntu4
Architecture: amd64
CurrentDesktop: GNOME
Date: Wed May 24 11:34:12 2017
InstallationDate: Installed on 2017-04-28 (25 days ago)
InstallationMedia: Ubuntu-GNOME 17.10 "Artful Aardvark" - Alpha amd64 (20170426)
PackageArchitecture: all
SourcePackage: ubuntu-themes
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
fcole90 (fcole90) wrote :
tags: added: visual-quality
Revision history for this message
fcole90 (fcole90) wrote :

This happens when using ubuntu-mono-dark as icon them, I don't have any problem with other icon themes.

summary: - Blurry battery indicator
+ Squashed blurry battery indicator
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: Squashed blurry battery indicator

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Changed in ubuntu-mono (Ubuntu):
status: New → Confirmed
Changed in ubuntu-themes (Ubuntu):
status: New → Confirmed
summary: - Squashed blurry battery indicator
+ Squashed blurry battery indicator in gnome-shell
Revision history for this message
Amr Ibrahim (amribrahim1987) wrote : Re: Squashed blurry battery indicator in gnome-shell

The ubuntu-mono source does not exist post-precise. It was replaced with the ubuntu-themes source.

no longer affects: ubuntu-mono (Ubuntu)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Note this bug is most significant on low DPI machines. If you view it in high DPI then you can make out the shape of the battery better, but it's still not great.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The good news: I have a proof of concept fix attached. Just made sure all the icons have invisible square borders, and all are 24x24.

The bad news (1): A more modern directory layout for our icon theme would be required to use these. Just putting them in the 24/ directory is not enough. You have to put them in 16/ and 22/ too, which is obviously wrong because they are actually 24x24.

The bad news (2): Adwaita's default battery icon looks much better than even the fixed Ubuntu mono one. Because Gnome Shell shrinks the icons too much to make out details in Ubuntu's long narrow battery icon. Adwaita's is more "readable".

The bad news (3): Nobody noticed that even with Ubuntu-mono-dark icons, Gnome Shell is still using the Adwaita icons for other things like wifi. It's failing to pick up the Ubuntu wifi icons and others. So we really need to address the entire icon them as a whole...

In the meantime I suggest we should find an elegant way to just use the Adwaita shell icons (as we already are for non-battery icons). Because using the "fix" attached here still doesn't look as nice as Adwaita battery icons.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

And for future reference:

To make a 32x24 icon (which is really only 24 wide with padding) into 24x24, use this (and adjust accordingly for other dimensions):

convert -background none -extent 32x32 -page -5+0 INFILE.svg - | convert -background none -crop 24x24 - OUTFILE.svg

summary: - Squashed blurry battery indicator in gnome-shell
+ Squashed blurry battery indicator in gnome-shell (using ubuntu-mono
+ icons)
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: Squashed blurry battery indicator in gnome-shell (using ubuntu-mono icons)

And we could achieve the same "fix" as comment #8 by modifying gnome-shell itself to ensure non-square icons are padded into squares, and never stretched.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Mh, i remember we had some kind of "custom code" in unity for this...

IIRC it should be here: http://bazaar.launchpad.net/~unity-team/unity/trusty/view/head:/panel/PanelIndicatorEntryView.cpp#L397

I guess this happens because the icon isn't squared, so if we change the icon to be a square we'd probably break unity.
I don't think it's wrong to try to push the same fix in g-s too, but I need to check.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Ups... I didn't read your latest comment... So yeah. We agree :-D

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Deleted attachment from comment #8. I had unwittingly produced SVGs containing PNG (non-scalable) :)

But regardless, I don't think squaring the icons or modifying gnome-shell to accept non-square is the answer. Because even after you fix the aspect ratio, the Ubuntu mono battery icons still look bad. The reason seems to be that Gnome Shell allocates less space for them than Unity7 does. So they get scaled down in Gnome Shell (smaller and blurrier than Unity7). You never get to see all 24x24 pixels in Gnome Shell at scaling factor 1.0.

So there are really only two options to solve this bug properly:
  1. Design new battery icons that are readable at smaller sizes than we're used to in Unity7; or
  2. Use some existing battery icons that do look good in Gnome Shell (like Adwaita's).

tags: added: gnome-17.10
summary: Squashed blurry battery indicator in gnome-shell (using ubuntu-mono
- icons)
+ icons at default low-DPI scale 1.0)
summary: - Squashed blurry battery indicator in gnome-shell (using ubuntu-mono
+ Distorted blurry battery indicator in gnome-shell (using ubuntu-mono
icons at default low-DPI scale 1.0)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Actually, this might work (and I apologise to design for troubling them if it does):

1. Ensure we use the SVGs from "22": /usr/share/icons/ubuntu-mono-dark/status/22/

2. Fix gnome-shell to add square padding, avoiding distortion.

The battery icons in 22/ have a narrower width (26x22 px) so should render to gnome-shell more clearly than 16/ (32x16px) or 24/ (32x24px) that would both pad out to 32x32 and then get scaled down too much to be readable.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

and 3. Keep the SVGs as proper SVGs. Don't accidentally rasterize them like I did.

Changed in ubuntu-themes (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
status: Confirmed → In Progress
Changed in ubuntu-themes:
assignee: nobody → Daniel van Vugt (vanvugt)
status: New → In Progress
Changed in ubuntu-themes (Ubuntu):
status: In Progress → Confirmed
assignee: Daniel van Vugt (vanvugt) → nobody
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Nope, comment #14 won't really work adequately either. As a proof of concept, here's something that demonstrates what the outcome would be:
   https://code.launchpad.net/~vanvugt/ubuntu-themes/fix-1693155/+merge/326127

Changed in ubuntu-themes:
status: In Progress → Confirmed
assignee: Daniel van Vugt (vanvugt) → nobody
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

"New icons" might not be strictly required.

If someone can edit: /usr/share/icons/ubuntu-mono-dark/status/{22,24}/battery*.svg
and change them to actual squares of the correct dimensions (22x22, 24x24) then I think that would be a proper fix. It does require editing (recentering) the curves though, and not just changing the canvas dimensions. So you would need a proper vector graphics editor.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Design says:
"For now please revert to Gnome standard, we first want to get to a workable theme and once everything is converted to Gnome we can look at improving the icons (this might be an 18.04 timeframe)."

Changed in ubuntu-themes:
assignee: nobody → Daniel van Vugt (vanvugt)
status: Confirmed → In Progress
Changed in ubuntu-ux:
status: New → Fix Committed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Although it appears tricky to just remove gnome-shell-related battery icon symlinks without causing the same changes to occur in Unity7 and unity-greeter. Needs more time and consideration than I have right now.

Changed in ubuntu-themes:
assignee: Daniel van Vugt (vanvugt) → nobody
status: In Progress → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

OK, it turns out that just reverting to Adwaita's battery actually creates as many problems as it fixes (see unity7 and unity-greeter). So let's not do that.

I now know how to fix this properly using Inkscape. Just need to get around to editing all 30-40 battery icons by hand. Will do it this week...

Changed in ubuntu-themes:
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in ubuntu-themes (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in ubuntu-themes:
status: Confirmed → In Progress
Changed in ubuntu-themes:
importance: Undecided → High
Changed in ubuntu-themes (Ubuntu):
importance: Undecided → High
Changed in ubuntu-themes (Ubuntu):
status: Confirmed → In Progress
Changed in gnome-shell (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-themes - 16.10+17.10.20170703-0ubuntu1

---------------
ubuntu-themes (16.10+17.10.20170703-0ubuntu1) artful; urgency=medium

  [ Daniel van Vugt ]
  * Fixed the ubuntu-mono-dark battery icons to avoid distortion in (LP:
    #1693155)

 -- Marco Trevisan (Treviño) <mail@3v1n0.net> Mon, 03 Jul 2017 12:11:11 +0000

Changed in ubuntu-themes (Ubuntu):
status: In Progress → Fix Released
Changed in ubuntu-themes:
status: In Progress → 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.