[gnome-tweaks/wip/carlosg/shuffle-font-mouse-settings] font: Update font aa/hinting to new gsettings-desktop-schemas location
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweaks/wip/carlosg/shuffle-font-mouse-settings] font: Update font aa/hinting to new gsettings-desktop-schemas location
- Date: Wed, 26 Aug 2020 22:52:18 +0000 (UTC)
commit 22547f294cfc1a321f9b297372ebd30c2bececeb
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Aug 27 00:16:08 2020 +0200
font: Update font aa/hinting to new gsettings-desktop-schemas location
These settings are moving to gsettings-desktop-schemas.
Related: https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/-/issues/31
gtweak/tweaks/tweak_group_font.py | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/gtweak/tweaks/tweak_group_font.py b/gtweak/tweaks/tweak_group_font.py
index 3d7d61e2..a1d51523 100644
--- a/gtweak/tweaks/tweak_group_font.py
+++ b/gtweak/tweaks/tweak_group_font.py
@@ -14,7 +14,7 @@ class FontXSettingsTweak(Gtk.Box, Tweak):
Gtk.Box.__init__(self)
Tweak.__init__(self, _("Hinting"), _("Antialiasing"))
- self.settings = Gio.Settings("org.gnome.settings-daemon.plugins.xsettings")
+ self.settings = Gio.Settings("org.gnome.desktop.interface")
self.set_spacing(12)
self.props.margin_top = 12
@@ -29,25 +29,25 @@ class FontXSettingsTweak(Gtk.Box, Tweak):
self.btn_full = Gtk.RadioButton.new_from_widget(None)
self.btn_full.set_label(_("Full"))
- self.btn_full.set_active(self.settings["hinting"] == "full")
+ self.btn_full.set_active(self.settings["font-hinting"] == "full")
self.btn_full.connect("toggled", self.on_hint_button_toggled)
hint_box.pack_start(self.btn_full, False, False, 0)
self.btn_med = Gtk.RadioButton.new_from_widget(self.btn_full)
self.btn_med.set_label(_("Medium"))
- self.btn_med.set_active(self.settings["hinting"] == "medium")
+ self.btn_med.set_active(self.settings["font-hinting"] == "medium")
self.btn_med.connect("toggled", self.on_hint_button_toggled)
hint_box.pack_start(self.btn_med, False, False, 0)
self.btn_slight = Gtk.RadioButton.new_from_widget(self.btn_full)
self.btn_slight.set_label(_("Slight"))
- self.btn_slight.set_active(self.settings["hinting"] == "slight")
+ self.btn_slight.set_active(self.settings["font-hinting"] == "slight")
self.btn_slight.connect("toggled", self.on_hint_button_toggled)
hint_box.pack_start(self.btn_slight, False, False, 0)
self.btn_hnone = Gtk.RadioButton.new_from_widget(self.btn_full)
self.btn_hnone.set_label(_("None"))
- self.btn_hnone.set_active(self.settings["hinting"] == "none")
+ self.btn_hnone.set_active(self.settings["font-hinting"] == "none")
self.btn_hnone.connect("toggled", self.on_hint_button_toggled)
hint_box.pack_start(self.btn_hnone, False, False, 0)
@@ -60,40 +60,40 @@ class FontXSettingsTweak(Gtk.Box, Tweak):
self.btn_rgba = Gtk.RadioButton.new_from_widget(None)
self.btn_rgba.set_label(_("Subpixel (for LCD screens)"))
- self.btn_rgba.set_active(self.settings["antialiasing"] == "rgba")
+ self.btn_rgba.set_active(self.settings["font-antialiasing"] == "rgba")
self.btn_rgba.connect("toggled", self.on_aa_button_toggled)
aa_box.pack_start(self.btn_rgba, False, False, 0)
self.btn_gray = Gtk.RadioButton.new_from_widget(self.btn_rgba)
self.btn_gray.set_label(_("Standard (grayscale)"))
- self.btn_gray.set_active(self.settings["antialiasing"] == "grayscale")
+ self.btn_gray.set_active(self.settings["font-antialiasing"] == "grayscale")
self.btn_gray.connect("toggled", self.on_aa_button_toggled)
aa_box.pack_start(self.btn_gray, False, False, 0)
self.btn_anone = Gtk.RadioButton.new_from_widget(self.btn_rgba)
self.btn_anone.set_label(_("None"))
- self.btn_anone.set_active(self.settings["antialiasing"] == "none")
+ self.btn_anone.set_active(self.settings["font-antialiasing"] == "none")
self.btn_anone.connect("toggled", self.on_aa_button_toggled)
aa_box.pack_start(self.btn_anone, False, False, 0)
def on_hint_button_toggled(self, button):
if self.btn_full.get_active():
- self.settings["hinting"] ="full"
+ self.settings["font-hinting"] ="full"
elif self.btn_med.get_active():
- self.settings["hinting"] = "medium"
+ self.settings["font-hinting"] = "medium"
elif self.btn_slight.get_active():
- self.settings["hinting"] = "slight"
+ self.settings["font-hinting"] = "slight"
else:
print("none")
- self.settings["hinting"] = "none"
+ self.settings["font-hinting"] = "none"
def on_aa_button_toggled(self, button):
if self.btn_rgba.get_active():
- self.settings["antialiasing"] = "rgba"
+ self.settings["font-antialiasing"] = "rgba"
elif self.btn_gray.get_active():
- self.settings["antialiasing"] = "grayscale"
+ self.settings["font-antialiasing"] = "grayscale"
else:
- self.settings["antialiasing"] = "none"
+ self.settings["font-antialiasing"] = "none"
TWEAK_GROUPS = [
ListBoxTweakGroup(_("Fonts"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]