Changes
5 changed files (+54/-38)
-
-
@@ -14,7 +14,13 @@ public Model.Model model { get; construct; }public DateTime month { get; set construct; } private Gtk.Grid grid = new Gtk.Grid(); private Gtk.Label title = new Gtk.Label(""); private Gtk.Label title = new Gtk.Label("") { css_classes = { "numeric" }, hexpand = true, hexpand_set = true, }; private Array<CalendarCell> cells = new Array<CalendarCell>(); public CalendarView(Model.Model model) {
-
@@ -27,27 +33,27 @@ );} construct { var header = new Gtk.Box(HORIZONTAL, 4); header.hexpand = true; header.margin_top = 4; header.margin_bottom = header.margin_top; header.margin_start = 8; header.margin_end = header.margin_start; var header = new Gtk.Box(HORIZONTAL, 4) { hexpand = true, margin_top = 4, margin_bottom = 4, margin_start = 8, margin_end = 8, }; var prev = new Gtk.Button(); prev.label = "Prev"; var prev = new Gtk.Button() { label = "Prev", }; prev.clicked.connect(() => { month = month.add_months(-1); }); header.append(prev); title.css_classes = { "numeric" }; title.hexpand = true; title.hexpand_set = true; header.append(title); var next = new Gtk.Button(); next.label = "Next"; var next = new Gtk.Button() { label = "Next", }; next.clicked.connect(() => { month = month.add_months(1); });
-
@@ -79,9 +85,9 @@for (var d = first_cell; d.compare(last_cell) < 1; d = d.add_days(1)) { var cell = new CalendarCell(d) { dimmed = d.get_month() != month.get_month(), hexpand = true, vexpand = true, }; cell.hexpand = true; cell.vexpand = true; cells.append_val(cell); grid.attach( cell,
-
-
-
@@ -17,8 +17,9 @@ Object(model: model, orientation: Gtk.Orientation.VERTICAL, spacing: 4);} construct { var list = new TimerList(model.stopped_timers); list.vexpand = true; var list = new TimerList(model.stopped_timers) { vexpand = true, }; this.append(list); } }
-
-
-
@@ -45,8 +45,9 @@ "Calendar","x-office-calendar-symbolic" ); var switcher = new Adw.ViewSwitcher(); switcher.stack = stack; var switcher = new Adw.ViewSwitcher() { stack = stack, }; header_bar.title_widget = switcher;
-
-
-
@@ -14,8 +14,14 @@ public signal void create(string title);public bool primary { get; set; } private Gtk.Text title_input = new Gtk.Text(); private Gtk.Button submit_button = new Gtk.Button(); private Gtk.Text title_input = new Gtk.Text() { hexpand = true, receives_default = true, }; private Gtk.Button submit_button = new Gtk.Button() { label = "Start", }; construct { this.margin_top = 8;
-
@@ -25,12 +31,9 @@ this.margin_end = this.margin_start;this.spacing = 8; title_input.activate.connect(this.submit); title_input.hexpand = true; title_input.receives_default = true; this.append(title_input); submit_button.clicked.connect(this.submit); submit_button.label = "Start"; this.append(submit_button); this.notify["primary"].connect(() => {
-
-
-
@@ -18,11 +18,22 @@public Model.Timer? timer { get; set construct; } private Binding? timer_binding = null; private Gtk.Label title = new Gtk.Label(""); private Gtk.Label title = new Gtk.Label("") { halign = START, css_classes = { "heading" }, }; private TimeSpan elapsed = new TimeSpan() { compact = true halign = START, css_classes = { "numeric" }, compact = true, }; private Gtk.Button stop_button = new Gtk.Button(); private Gtk.Button stop_button = new Gtk.Button() { label = "Stop", visible = false, }; construct { this.notify["timer"].connect(() => {
-
@@ -56,22 +67,16 @@ this.margin_start = 12;this.margin_end = this.margin_start; this.spacing = 8; var info_col = new Gtk.Box(VERTICAL, 4); info_col.hexpand = true; info_col.hexpand_set = true; var info_col = new Gtk.Box(VERTICAL, 4) { hexpand = true, hexpand_set = true, }; title.halign = START; title.css_classes = { "heading" }; info_col.append(title); elapsed.halign = START; elapsed.css_classes = { "numeric" }; info_col.append(elapsed); this.append(info_col); stop_button.label = "Stop"; stop_button.visible = false; stop_button.clicked.connect(() => { if (timer != null) { this.stop(timer);
-