[gtk/wip/carlosg/font-setting-lookups-4.0] gdk/wayland: Look for font settings recursively
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/font-setting-lookups-4.0] gdk/wayland: Look for font settings recursively
- Date: Wed, 24 Feb 2021 15:02:49 +0000 (UTC)
commit c6bc0d2005d9d6e1cf54c49b4b4146102d418f80
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Feb 18 16:12:53 2021 +0100
gdk/wayland: Look for font settings recursively
Use the infrastructure already available to look up keys, instead.
This does the right thing and looks up the setting across all
sources.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3680
gdk/wayland/gdkdisplay-wayland.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index b261c77fae..c5f9c5821e 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -1548,15 +1548,11 @@ update_xft_settings (GdkDisplay *display)
}
else
{
- GSettingsSchemaSource *source;
- GSettingsSchema *schema;
+ TranslationEntry *entry;
- source = g_settings_schema_source_get_default ();
- schema = g_settings_schema_source_lookup (source,
- "org.gnome.desktop.interface",
- FALSE);
+ entry = find_translation_entry_by_schema ("org.gnome.desktop.interface", "font-antialiasing");
- if (schema && g_settings_schema_has_key (schema, "font-antialiasing"))
+ if (entry && entry->valid)
{
settings = g_hash_table_lookup (display_wayland->settings,
"org.gnome.desktop.interface");
@@ -1580,9 +1576,6 @@ update_xft_settings (GdkDisplay *display)
order = GSD_FONT_RGBA_ORDER_RGB;
}
- if (schema)
- g_settings_schema_unref (schema);
-
dpi = get_dpi_from_gsettings (display_wayland) * 1024;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]