Set notification size in terms of characters
Bug #1490167 reported by
Danielle Foré
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: | added: a11y hidpi |
Changed in gala: | |
importance: | Undecided → Medium |
To post a comment you must log in.
`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. /drafts. csswg.org/ css-values- 3/#font- relative- lengths
You can read more about them here: https:/
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.
```