From 616b7e776c8d42c24672c355b1b4325a1afe1108 Mon Sep 17 00:00:00 2001 From: Golamrabbi Azad Date: Tue, 3 Sep 2024 15:56:47 +0600 Subject: [PATCH 1/2] fix: task schedule button issues --- core/Widgets/DateTimePicker/ScheduleButton.vala | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/core/Widgets/DateTimePicker/ScheduleButton.vala b/core/Widgets/DateTimePicker/ScheduleButton.vala index 901a2906c..9103359d0 100644 --- a/core/Widgets/DateTimePicker/ScheduleButton.vala +++ b/core/Widgets/DateTimePicker/ScheduleButton.vala @@ -24,9 +24,9 @@ public class Widgets.ScheduleButton : Gtk.Grid { public string label { get; construct; } private Gtk.Label due_label; - private Gtk.Box schedule_box; private Gtk.Image due_image; + private Widgets.DateTimePicker.TimePicker time_picker; private Widgets.DateTimePicker.DateTimePicker datetime_picker; private Gtk.Revealer clear_revealer; @@ -121,6 +121,7 @@ public class Widgets.ScheduleButton : Gtk.Grid { var clear_button = new Gtk.Button.from_icon_name ("window-close") { css_classes = { "flat" } }; + clear_button.set_tooltip_text ("Clear Schedule"); clear_revealer = new Gtk.Revealer () { transition_type = Gtk.RevealerTransitionType.CROSSFADE, @@ -213,6 +214,7 @@ public class Widgets.ScheduleButton : Gtk.Grid { due_label.label = Utils.Datetime.get_relative_date_from_date (item.due.datetime); due_label.tooltip_text = due_label.label; + due_image.tooltip_text = due_label.label; duedate = item.due; @@ -255,10 +257,15 @@ public class Widgets.ScheduleButton : Gtk.Grid { } public void reset () { + due_image.icon_name = "month-symbolic"; + due_image.tooltip_text = label; due_label.label = label; + due_label.tooltip_text = label; tooltip_text = label; - due_image.icon_name = "month-symbolic"; - duedate = new Objects.DueDate (); datetime_picker.reset (); + time_picker.has_time = false; + duedate = new Objects.DueDate (); + duedate.datetime = null; + duedate_changed (); } } From 325e86af0f566a4a7848be89f4bfd135348eb881 Mon Sep 17 00:00:00 2001 From: Golamrabbi Azad Date: Tue, 3 Sep 2024 19:14:12 +0600 Subject: [PATCH 2/2] refactor: timepicker widget import removed --- core/Widgets/DateTimePicker/ScheduleButton.vala | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/Widgets/DateTimePicker/ScheduleButton.vala b/core/Widgets/DateTimePicker/ScheduleButton.vala index 9103359d0..39ad73961 100644 --- a/core/Widgets/DateTimePicker/ScheduleButton.vala +++ b/core/Widgets/DateTimePicker/ScheduleButton.vala @@ -26,7 +26,6 @@ public class Widgets.ScheduleButton : Gtk.Grid { private Gtk.Label due_label; private Gtk.Box schedule_box; private Gtk.Image due_image; - private Widgets.DateTimePicker.TimePicker time_picker; private Widgets.DateTimePicker.DateTimePicker datetime_picker; private Gtk.Revealer clear_revealer; @@ -263,7 +262,6 @@ public class Widgets.ScheduleButton : Gtk.Grid { due_label.tooltip_text = label; tooltip_text = label; datetime_picker.reset (); - time_picker.has_time = false; duedate = new Objects.DueDate (); duedate.datetime = null; duedate_changed ();