28
28
show_welcomescreen_switcher.halign = Gtk.Align.START;
29
29
container.attach(show_welcomescreen_switcher, 1, 1, 1, 1);
32
var face_color = new Gtk.Label (_("Widget Font face color"));
33
face_color.xalign = 1.0f;
34
container.attach(face_color, 0, 2, 1, 1);
35
var face_color_selector = new Gtk.ColorButton();
36
face_color_selector.halign = Gtk.Align.START;
37
container.attach(face_color_selector, 1, 2, 1, 1);
39
var shadow_color = new Gtk.Label (_("Widget Shadow color"));
40
shadow_color.xalign = 1.0f;
41
container.attach(shadow_color, 0, 3, 1, 1);
42
var shadow_color_selector = new Gtk.ColorButton();
43
shadow_color_selector.halign = Gtk.Align.START;
44
container.attach(shadow_color_selector, 1, 3, 1, 1);
46
var title_font = new Gtk.Label (_("Widget Title font"));
47
title_font.xalign = 1.0f;
48
container.attach(title_font, 0, 4, 1, 1);
49
var title_font_chooser = new Gtk.FontButton ();
50
title_font_chooser.show_size = false;
51
title_font_chooser.halign = Gtk.Align.START;
52
title_font_chooser.set_filter_func((family, face) => {
53
return face.describe().get_weight() == Pango.Weight.NORMAL &&
54
face.describe().get_style() == Pango.Style.NORMAL;
56
title_font_chooser.use_font = true;
57
container.attach(title_font_chooser, 1, 4, 1, 1);
59
var content_font = new Gtk.Label (_("Widget Content font"));
60
content_font.xalign = 1.0f;
61
container.attach(content_font, 0, 5, 1, 1);
62
var content_font_chooser = new Gtk.FontButton ();
63
content_font_chooser.show_size = false;
64
content_font_chooser.halign = Gtk.Align.START;
65
content_font_chooser.set_filter_func((family, face) => {
66
return face.describe().get_weight() == Pango.Weight.NORMAL &&
67
face.describe().get_style() == Pango.Style.NORMAL;
69
content_font_chooser.use_font = true;
70
container.attach(content_font_chooser, 1, 5, 1, 1);
72
// SEPERATOR FOR IMPORTANT ACTIONS
73
var separator = new Gtk.Separator (Gtk.Orientation.HORIZONTAL);
74
container.attach(separator, 0, 6, 2, 1);
31
// Help and License text label
32
var help_license = new Gtk.Label ("<a href='https://answers.launchpad.net/gazette'>" + _("Find help online") + "</a>\nGazette Newsies - © 2013 GPLv3");
33
help_license.set_use_markup (true);
34
help_license.set_line_wrap (true);
35
help_license.halign = Gtk.Align.END;
36
container.attach(help_license, 0, 8, 1, 1);
77
39
var resetButton = new Gtk.Button.with_label ( _("Reset") );
78
40
resetButton.halign = Gtk.Align.START;
79
container.attach(resetButton, 1, 7, 1, 1);
41
container.attach(resetButton, 1, 8, 1, 1);
80
42
resetButton.clicked.connect(() => {
81
43
appearance_settings.reset("content-font");
82
44
appearance_settings.reset("text-font");
135
Gdk.RGBA aux_color = Gdk.RGBA();
137
aux_color.parse(appearance_settings.get_string("text-color"));
138
face_color_selector.rgba = aux_color;
139
face_color_selector.color_set.connect( () => {
140
appearance_settings.set_string("text-color", face_color_selector.rgba.to_string());
143
aux_color.parse(appearance_settings.get_string("shadow-color"));
144
shadow_color_selector.rgba = aux_color;
145
shadow_color_selector.color_set.connect( () => {
146
appearance_settings.set_string("shadow-color", shadow_color_selector.rgba.to_string());
149
title_font_chooser.font_name = appearance_settings.get_string ("title-font");
150
title_font_chooser.font_set.connect( () => {
151
var font = title_font_chooser.font_name;
152
var split_index = font.last_index_of_char(' ');
153
var font_face = font.substring(0, split_index);
154
appearance_settings.set_string ("title-font", font_face);
157
content_font_chooser.font_name = appearance_settings.get_string ("content-font");
158
content_font_chooser.font_set.connect( () => {
159
var font = content_font_chooser.font_name;
160
var split_index = font.last_index_of_char(' ');
161
var font_face = font.substring(0, split_index);
162
appearance_settings.set_string ("content-font", font_face);