66 lines
2.4 KiB
Diff
66 lines
2.4 KiB
Diff
From: Joshua Strobl <joshua@streambits.io>
|
|
Date: Mon, 12 Apr 2021 06:14:04 +0300
|
|
Subject: [PATCH] Support moved font anti-aliasing and hinting in GSD 40. Fixes
|
|
#2121.
|
|
|
|
---
|
|
src/panel/meson.build | 4 ++++
|
|
src/panel/settings/settings_fonts.vala | 11 ++++++++++-
|
|
2 files changed, 14 insertions(+), 1 deletion(-)
|
|
|
|
diff --git src/panel/meson.build src/panel/meson.build
|
|
index ee610868..5451c278 100644
|
|
--- src/panel/meson.build
|
|
+++ src/panel/meson.build
|
|
@@ -72,6 +72,10 @@ budgie_panel_vala_args = [
|
|
'--gresources=' + gresource,
|
|
]
|
|
|
|
+if dep_gsd.version().version_compare('>=40.0')
|
|
+ budgie_panel_vala_args += ['-D', 'HAVE_GSD_40']
|
|
+endif
|
|
+
|
|
budgie_panel_c_args = [
|
|
'-DWNCK_I_KNOW_THIS_IS_UNSTABLE'
|
|
]
|
|
diff --git src/panel/settings/settings_fonts.vala src/panel/settings/settings_fonts.vala
|
|
index fc17622f..f750b926 100644
|
|
--- src/panel/settings/settings_fonts.vala
|
|
+++ src/panel/settings/settings_fonts.vala
|
|
@@ -24,7 +24,10 @@ namespace Budgie {
|
|
|
|
private Settings ui_settings;
|
|
private Settings wm_settings;
|
|
+
|
|
+#if !HAVE_GSD_40
|
|
private Settings x_settings;
|
|
+#endif
|
|
|
|
public FontPage() {
|
|
Object(group: SETTINGS_GROUP_APPEARANCE,
|
|
@@ -135,14 +138,20 @@ namespace Budgie {
|
|
/* Hook up settings */
|
|
ui_settings = new Settings("org.gnome.desktop.interface");
|
|
wm_settings = new Settings("org.gnome.desktop.wm.preferences");
|
|
- x_settings = new Settings("org.gnome.settings-daemon.plugins.xsettings");
|
|
ui_settings.bind("document-font-name", fontbutton_document, "font-name", SettingsBindFlags.DEFAULT);
|
|
ui_settings.bind("font-name", fontbutton_interface, "font-name", SettingsBindFlags.DEFAULT);
|
|
ui_settings.bind("monospace-font-name", fontbutton_monospace, "font-name", SettingsBindFlags.DEFAULT);
|
|
wm_settings.bind("titlebar-font", fontbutton_title, "font-name", SettingsBindFlags.DEFAULT);
|
|
ui_settings.bind("text-scaling-factor", spinbutton_scaling, "value", SettingsBindFlags.DEFAULT);
|
|
+
|
|
+#if HAVE_GSD_40
|
|
+ ui_settings.bind("font-antialiasing", combobox_antialias, "active-id", SettingsBindFlags.DEFAULT);
|
|
+ ui_settings.bind("font-hinting", combobox_hinting, "active-id", SettingsBindFlags.DEFAULT);
|
|
+#else
|
|
+ x_settings = new Settings("org.gnome.settings-daemon.plugins.xsettings");
|
|
x_settings.bind("hinting", combobox_hinting, "active-id", SettingsBindFlags.DEFAULT);
|
|
x_settings.bind("antialiasing", combobox_antialias, "active-id", SettingsBindFlags.DEFAULT);
|
|
+#endif
|
|
}
|
|
}
|
|
}
|
|
--
|
|
2.31.1
|
|
|