Set notification size in terms of characters

Bug #1490167 reported by Danielle Foré
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Gala
New
Medium
Unassigned

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

Tags: hidpi a11y
tags: added: a11y hidpi
Revision history for this message
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: https://drafts.csswg.org/css-values-3/#font-relative-lengths

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. http://www.quirksmode.org/css/units-values/

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.
```

Changed in gala:
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

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