Set notification size in terms of characters

Bug #1490167 reported by Daniel Fore on 2015-08-29
This bug affects 5 people
Affects Status Importance Assigned to Milestone

Bug Description

Instead of hardcoding pixel sizes we should use character width like gtk would. This would fix HiDPI sizes and also fit better when using the "large fonts" a11y feature

Daniel Fore (danrabbit) on 2015-08-29
tags: added: a11y hidpi
Lewis Goddard (lewisgoddard) wrote :

`ch` is the unit for character width, which is taken from "0", and if not available is assumed to be 0.5em

The full set of font-relative lengths are: em, ex, ch, & rem.
You can read more about them here:

Unfortunately, I am not sure of the support Gtk offers for such a simple css method, and it is possible they themselves are using some more complex mathematics to figure out character-based widths. In fact, even Chrome doesn't support it yet.

As a fallback, we could use the default of 0.5em and make an assumption based on that.

width: 30em; // Roughly 60 characters.
width: 60ch; // Exactly 60 characters.

Daniel Fore (danrabbit) on 2016-06-07
Changed in gala:
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related blueprints