29
29
var cur_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 20);
30
30
var cur_label = new Gtk.Label ( _("Select a Widget to configure") );
33
var container_global = new Gtk.Grid ();
34
container_global.margin = 4;
35
container_global.row_spacing = 4;
36
container_global.column_spacing = 12;
37
container_global.column_homogeneous = true;
39
// SEPERATOR FOR IMPORTANT ACTIONS
40
var separator = new Gtk.Separator (Gtk.Orientation.HORIZONTAL);
41
container_global.attach(separator, 0, 0, 3, 1);
44
var refreshLabel = new Gtk.Label (_("Refresh Interval") + " :");
45
container_global.attach(refreshLabel, 0, 1, 1, 1);
46
refreshLabel.set_alignment (1, 0);
49
var scale = new Gtk.Scale.with_range (Gtk.Orientation.HORIZONTAL, 0, 3600000, 60000);
50
scale.set_draw_value (false);
51
scale.add_mark (300000, Gtk.PositionType.BOTTOM, _("5 min"));
52
scale.add_mark (1200000, Gtk.PositionType.BOTTOM, _("20 min"));
53
scale.add_mark (2400000, Gtk.PositionType.BOTTOM, _("40 min"));
54
scale.add_mark (3600000, Gtk.PositionType.BOTTOM, _("1 hour"));
56
//scale.set_value (update_interval);
58
scale.value_changed.connect (() => {
59
//settings.set_int("update-interval", (int) scale.get_value() );
62
container_global.attach(scale, 1, 1, 2, 1);
64
var face_color = new Gtk.Label (_("Face color / Shadow color") + " :");
65
face_color.xalign = 1.0f;
66
container_global.attach(face_color, 0, 2, 1, 1);
67
var face_color_selector = new Gtk.ColorButton();
68
container_global.attach(face_color_selector, 1, 2, 1, 1);
70
var shadow_color_selector = new Gtk.ColorButton();
71
container_global.attach(shadow_color_selector, 2, 2, 1, 1);
73
var title_font = new Gtk.Label (_("Title font / Content font") + " :");
74
title_font.xalign = 1.0f;
75
container_global.attach(title_font, 0, 3, 1, 1);
76
var title_font_chooser = new Gtk.FontButton ();
77
title_font_chooser.show_size = false;
78
title_font_chooser.set_filter_func((family, face) => {
79
return face.describe().get_weight() == Pango.Weight.NORMAL &&
80
face.describe().get_style() == Pango.Style.NORMAL;
82
title_font_chooser.use_font = true;
83
container_global.attach(title_font_chooser, 1, 3, 1, 1);
85
var content_font_chooser = new Gtk.FontButton ();
86
content_font_chooser.show_size = false;
87
content_font_chooser.set_filter_func((family, face) => {
88
return face.describe().get_weight() == Pango.Weight.NORMAL &&
89
face.describe().get_style() == Pango.Style.NORMAL;
91
content_font_chooser.use_font = true;
92
container_global.attach(content_font_chooser, 2, 3, 1, 1);
95
var resetButton = new Gtk.Button.with_label ( _("Reset") );
96
resetButton.halign = Gtk.Align.START;
97
container_global.attach(resetButton, 2, 4, 1, 1);
98
resetButton.clicked.connect(() => {
99
// GLOBAL RESET ACTIONS COME HERE
103
Gdk.RGBA aux_color = Gdk.RGBA();
106
face_color_selector.rgba = aux_color;
107
face_color_selector.color_set.connect( () => {
112
shadow_color_selector.rgba = aux_color;
113
shadow_color_selector.color_set.connect( () => {
118
title_font_chooser.font_set.connect( () => {
119
var font = title_font_chooser.font_name;
120
var split_index = font.last_index_of_char(' ');
121
var font_face = font.substring(0, split_index);
125
content_font_chooser.font_set.connect( () => {
126
var font = content_font_chooser.font_name;
127
var split_index = font.last_index_of_char(' ');
128
var font_face = font.substring(0, split_index);
32
138
var attrs = new Pango.AttrList ();
33
139
attrs.insert (new Pango.AttrFontDesc (
34
140
Pango.FontDescription.from_string ("bold 25")));