app/internal/window: apply font scale to dp scaling on Wayland

As discussed in gio#53, Linux font scales conflate two settings: the fractional
UI scale and the user preference as a result of conditions such as impaired
vision. The former setting should apply to both dps and sps, while the latter
only to sps. However, with the assumption that more users presumable change the
font scale for the former reason rather than the latter, we should apply the
font scale to both dps and sps in Gio.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-11-02 17:58:56 +01:00
parent e2c29f96d9
commit 5eeaadccea
+2 -7
View File
@@ -198,22 +198,17 @@ func createNativeWindow(opts *Options) (*window, error) {
scale = s
}
}
ppdp := ppmm * mmPrDp
ppsp := ppdp * fontScale
ppdp *= monitorScale
ppdp := ppmm * mmPrDp * fontScale
if ppdp < minDensity {
ppdp = minDensity
}
if ppsp < minDensity {
ppsp = minDensity
}
w := &window{
disp: conn.disp,
scale: scale,
newScale: scale != 1,
ppdp: ppdp,
ppsp: ppsp,
ppsp: ppdp,
}
w.notify.read = pipe[0]
w.notify.write = pipe[1]