ui/app: tweak monitor scale

Don't apply monitor scale to wayland font sizes, since it detects
the user scale itself.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-07-11 14:55:51 +02:00
parent 478d56102a
commit f4461721e3
4 changed files with 12 additions and 7 deletions
+7 -2
View File
@@ -198,17 +198,22 @@ func createNativeWindow(opts *WindowOptions) (*window, error) {
scale = s
}
}
ppdp := ppmm * mmPrDp * monitorScale
ppdp := ppmm * mmPrDp
ppsp := ppdp * fontScale
ppdp *= monitorScale
if ppdp < minDensity {
ppdp = minDensity
}
if ppsp < minDensity {
ppsp = minDensity
}
w := &window{
disp: conn.disp,
scale: scale,
newScale: scale != 1,
ppdp: ppdp,
ppsp: ppdp * fontScale,
ppsp: ppsp,
notRead: pipe[0],
notWrite: pipe[1],
}