mirror of
https://github.com/elementary/gala.git
synced 2024-11-25 03:06:14 +01:00
Some changes
This commit is contained in:
parent
90b5d6cfd0
commit
eef7e5a520
@ -3,15 +3,19 @@
|
||||
* SPDX-License-Identifier: LGPL-2.0-or-later
|
||||
*/
|
||||
|
||||
/* Clutter.Text with automatic management of system font */
|
||||
/*
|
||||
* Clutter.Text that automatically changes font-name to the system one
|
||||
*/
|
||||
public class Gala.Text : Clutter.Text {
|
||||
private GLib.Settings gnome_interface_settings;
|
||||
private static GLib.Settings gnome_interface_settings;
|
||||
|
||||
static construct {
|
||||
gnome_interface_settings = new GLib.Settings ("org.gnome.desktop.interface");
|
||||
}
|
||||
|
||||
construct {
|
||||
gnome_interface_settings = new GLib.Settings ("org.gnome.desktop.interface");
|
||||
|
||||
set_system_font_name ();
|
||||
gnome_interface_settings.notify["font-name"].connect (set_system_font_name);
|
||||
gnome_interface_settings.changed["font-name"].connect (set_system_font_name);
|
||||
}
|
||||
|
||||
private void set_system_font_name () {
|
||||
@ -25,5 +29,7 @@ public class Gala.Text : Clutter.Text {
|
||||
}
|
||||
|
||||
font_name = string.joinv (" ", name);
|
||||
|
||||
warning ("Gala.Text: Changing font to %s", font_name);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user