Possible fix for #6
This commit is contained in:
parent
2b24e8c9cb
commit
09f9a1e614
|
@ -161,8 +161,9 @@ class GtkTheme {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// fallback
|
// fallback
|
||||||
if (screenDPI.get() == 0) {
|
if (screenDPI.get() <= 0) {
|
||||||
// GET THE DPI IN LINUX
|
// GET THE DPI IN LINUX
|
||||||
// https://wiki.archlinux.org/index.php/Talk:GNOME
|
// https://wiki.archlinux.org/index.php/Talk:GNOME
|
||||||
Object detectedValue = Toolkit.getDefaultToolkit().getDesktopProperty("gnome.Xft/DPI");
|
Object detectedValue = Toolkit.getDefaultToolkit().getDesktopProperty("gnome.Xft/DPI");
|
||||||
|
@ -171,13 +172,14 @@ class GtkTheme {
|
||||||
if (dpi == -1) {
|
if (dpi == -1) {
|
||||||
screenDPI.set((int) defaultDPI);
|
screenDPI.set((int) defaultDPI);
|
||||||
}
|
}
|
||||||
if (dpi < 50) {
|
|
||||||
// 50 dpi is the minimum value gnome allows
|
|
||||||
screenDPI.set(50);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 50 dpi is the minimum value gnome allows, and assume something screwed up. We apply this for ALL environments!
|
||||||
|
if (screenDPI.get() < 50) {
|
||||||
|
screenDPI.set((int) defaultDPI);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// check system ENV variables.
|
// check system ENV variables.
|
||||||
if (screenScale.get() == 0) {
|
if (screenScale.get() == 0) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user