aboutsummaryrefslogtreecommitdiff
path: root/src/toggle-box.vala
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-06-12 15:12:22 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-06-12 15:12:22 +0200
commit63394a6ddc29eac797bfdd7bbb2c429d4b5ffd9f (patch)
treea4dd13c0fe4c35ac4623fbddd3bf560edaae2274 /src/toggle-box.vala
parent99d2c2687cf3d08cdf80dc1bd5a4e9603fbd9f71 (diff)
downloadarctica-greeter-63394a6ddc29eac797bfdd7bbb2c429d4b5ffd9f.tar.gz
arctica-greeter-63394a6ddc29eac797bfdd7bbb2c429d4b5ffd9f.tar.bz2
arctica-greeter-63394a6ddc29eac797bfdd7bbb2c429d4b5ffd9f.zip
override_font() deprecation warning: replace by GtkCssProvider blocks. Additionally, don't hard-code Cabin font anymore, use font_name gsettings property instead.
Diffstat (limited to 'src/toggle-box.vala')
-rw-r--r--src/toggle-box.vala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/toggle-box.vala b/src/toggle-box.vala
index 91a3e57..d953b2f 100644
--- a/src/toggle-box.vala
+++ b/src/toggle-box.vala
@@ -23,6 +23,10 @@ public class ToggleBox : Gtk.Box
public string starting_key {get; construct;}
public string selected_key {get; protected set;}
+ public static string font = AGSettings.get_string (AGSettings.KEY_FONT_NAME);
+ public static string font_family = font.split_set(" ")[0];
+ public static int font_size = int.parse(font.split_set(" ")[1]);
+
public ToggleBox (string? default_key, string? starting_key)
{
Object (default_key: default_key, starting_key: starting_key,
@@ -124,7 +128,7 @@ public class ToggleBox : Gtk.Box
}
var label = new Gtk.Label (null);
- label.set_markup ("<span font=\"Cabin 13\" fgcolor=\"%s\">%s</span>".printf (AGSettings.get_string (AGSettings.KEY_TOGGLEBOX_FONT_FGCOLOR), name));
+ label.set_markup ("<span font=\"%s %d\" fgcolor=\"%s\">%s</span>".printf (font_family, font_size+2, AGSettings.get_string (AGSettings.KEY_TOGGLEBOX_FONT_FGCOLOR), name));
label.halign = Gtk.Align.START;
hbox.pack_start (label, true, true, 0);