[gnome-shell] hidpi: Scale fonts on wayland
- From: Adel Gadllah <agadllah src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] hidpi: Scale fonts on wayland
- Date: Tue, 1 Jul 2014 10:02:28 +0000 (UTC)
commit 775bd961b679ae0113684551393f69ca6e77ed77
Author: Adel Gadllah <adel gadllah gmail com>
Date: Tue Jul 1 11:26:53 2014 +0200
hidpi: Scale fonts on wayland
On X11 we don't need to scale up fonts because font scaling is already handled
by clutter based xft-dpi. On wayland we need to set the resolution by ourselves
so do that when the scale factor changes.
https://bugzilla.gnome.org/show_bug.cgi?id=732537
src/shell-global.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/shell-global.c b/src/shell-global.c
index 18e3e09..dab8304 100644
--- a/src/shell-global.c
+++ b/src/shell-global.c
@@ -784,7 +784,11 @@ update_scale_factor (GtkSettings *settings,
g_value_init (&value, G_TYPE_INT);
if (gdk_screen_get_setting (global->gdk_screen, "gdk-window-scaling-factor", &value))
- g_object_set (context, "scale-factor", g_value_get_int (&value), NULL);
+ {
+ g_object_set (context, "scale-factor", g_value_get_int (&value), NULL);
+ if (meta_is_wayland_compositor ())
+ g_object_set (clutter_settings_get_default (), "font-dpi", 96 * 1024 * g_value_get_int (&value),
NULL);
+ }
/* Make sure clutter and gdk scaling stays disabled */
g_object_set (clutter_settings_get_default (), "window-scaling-factor", 1, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]