Skip to content

Commit eef7e5a

Browse files
committed
Some changes
1 parent 90b5d6c commit eef7e5a

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

lib/Text.vala

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@
33
* SPDX-License-Identifier: LGPL-2.0-or-later
44
*/
55

6-
/* Clutter.Text with automatic management of system font */
6+
/*
7+
* Clutter.Text that automatically changes font-name to the system one
8+
*/
79
public class Gala.Text : Clutter.Text {
8-
private GLib.Settings gnome_interface_settings;
10+
private static GLib.Settings gnome_interface_settings;
911

10-
construct {
12+
static construct {
1113
gnome_interface_settings = new GLib.Settings ("org.gnome.desktop.interface");
14+
}
1215

16+
construct {
1317
set_system_font_name ();
14-
gnome_interface_settings.notify["font-name"].connect (set_system_font_name);
18+
gnome_interface_settings.changed["font-name"].connect (set_system_font_name);
1519
}
1620

1721
private void set_system_font_name () {
@@ -25,5 +29,7 @@ public class Gala.Text : Clutter.Text {
2529
}
2630

2731
font_name = string.joinv (" ", name);
32+
33+
warning ("Gala.Text: Changing font to %s", font_name);
2834
}
2935
}

0 commit comments

Comments
 (0)