[gnome-settings-daemon/gnome-3-10] xsettings: Never turn on hi-dpi support for small resolutions
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/gnome-3-10] xsettings: Never turn on hi-dpi support for small resolutions
- Date: Fri, 14 Mar 2014 14:43:17 +0000 (UTC)
commit 3a4a63fa889718a46535130063d92ff704f1a7fb
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Thu Mar 13 16:37:47 2014 -0400
xsettings: Never turn on hi-dpi support for small resolutions
If the screen is less than 1200 pixels high, don't turn on hi-dpi
support - GNOME isn't going to work with that little vertical
real estate, and it's better just to be small.
https://bugzilla.gnome.org/show_bug.cgi?id=709859
plugins/xsettings/gsd-xsettings-manager.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/plugins/xsettings/gsd-xsettings-manager.c b/plugins/xsettings/gsd-xsettings-manager.c
index 366a55b..02195d1 100644
--- a/plugins/xsettings/gsd-xsettings-manager.c
+++ b/plugins/xsettings/gsd-xsettings-manager.c
@@ -227,8 +227,14 @@
*/
#define DPI_FALLBACK 96
+/* The minimum resolution at which we turn on a window-scale of 2 */
#define HIDPI_LIMIT (DPI_FALLBACK * 2)
+/* The minimum screen height at which we turn on a window-scale of 2;
+ * below this there just isn't enough vertical real estate for GNOME
+ * apps to work, and it's better to just be tiny */
+#define HIDPI_MIN_HEIGHT 1200
+
/* From http://en.wikipedia.org/wiki/4K_resolution#Resolutions_of_common_formats */
#define SMALLEST_4K_WIDTH 3656
@@ -592,6 +598,9 @@ get_window_scale (GnomeXSettingsManager *manager)
&width_mm, &height_mm);
}
+ if (height < HIDPI_MIN_HEIGHT)
+ goto out;
+
window_scale = 1;
if (width_mm > 0 && height_mm > 0) {
dpi_x = (double)width / (width_mm / 25.4);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]