@@ -24,7 +24,9 @@ public class Layouts.ItemBoard : Layouts.ItemBase {
24
24
private Gtk . Revealer motion_top_revealer;
25
25
26
26
private Gtk . CheckButton checked_button;
27
+ private Gtk . Revealer checked_button_revealer;
27
28
private Gtk . Label content_label;
29
+ private Gtk . Box content_box;
28
30
29
31
private Widgets . LoadingButton hide_loading_button;
30
32
private Gtk . Revealer hide_loading_revealer;
@@ -46,6 +48,7 @@ public class Layouts.ItemBoard : Layouts.ItemBase {
46
48
47
49
public Gtk . Box handle_grid;
48
50
public Adw . Bin card_widget;
51
+ public Gtk . Box footer_box;
49
52
private Gtk . Popover menu_handle_popover = null ;
50
53
private Widgets . ContextMenu . MenuItem no_date_item;
51
54
private Widgets . ContextMenu . MenuItem pinboard_item;
@@ -108,6 +111,12 @@ public class Layouts.ItemBoard : Layouts.ItemBase {
108
111
css_classes = { " priority-color" }
109
112
};
110
113
114
+ checked_button_revealer = new Gtk .Revealer () {
115
+ child = checked_button,
116
+ transition_type = SLIDE_RIGHT ,
117
+ reveal_child = true
118
+ };
119
+
111
120
content_label = new Gtk .Label (item. content) {
112
121
wrap = true ,
113
122
hexpand = true ,
@@ -121,7 +130,7 @@ public class Layouts.ItemBoard : Layouts.ItemBase {
121
130
halign = Gtk . Align . CENTER ,
122
131
margin_top = 7 ,
123
132
margin_end = 7 ,
124
- tooltip_text = _ ("Unpin "),
133
+ tooltip_text = _ ("Unpin "),
125
134
css_classes = { " min-height-0" , " view-button" }
126
135
};
127
136
@@ -144,13 +153,14 @@ public class Layouts.ItemBoard : Layouts.ItemBase {
144
153
child = select_checkbutton
145
154
};
146
155
147
- var content_box = new Gtk .Box (Gtk . Orientation . HORIZONTAL , 6 ) {
156
+ content_box = new Gtk .Box (Gtk . Orientation . HORIZONTAL , 6 ) {
148
157
margin_top = 6 ,
149
158
margin_start = 6 ,
150
159
margin_end = 6
151
160
};
152
161
153
- content_box. append (checked_button);
162
+ content_box. add_css_class (" transition" );
163
+ content_box. append (checked_button_revealer);
154
164
content_box. append (content_label);
155
165
content_box. append (select_revealer);
156
166
@@ -160,9 +170,9 @@ public class Layouts.ItemBoard : Layouts.ItemBase {
160
170
ellipsize = Pango . EllipsizeMode . END ,
161
171
margin_start = 30 ,
162
172
margin_end = 6 ,
163
- css_classes = { " dim-label" , " caption" }
173
+ css_classes = { " dim-label" , " caption" , " transition " }
164
174
};
165
-
175
+
166
176
description_revealer = new Gtk .Revealer () {
167
177
transition_type = Gtk . RevealerTransitionType . SLIDE_DOWN ,
168
178
child = description_label
@@ -243,7 +253,7 @@ public class Layouts.ItemBoard : Layouts.ItemBase {
243
253
child = subtaks_container
244
254
};
245
255
246
- var footer_box = new Gtk .Box (HORIZONTAL , 0 ) {
256
+ footer_box = new Gtk .Box (HORIZONTAL , 0 ) {
247
257
hexpand = true ,
248
258
margin_start = 30 ,
249
259
margin_top = 6 ,
@@ -529,7 +539,7 @@ public class Layouts.ItemBoard : Layouts.ItemBase {
529
539
checked_button. active = false ;
530
540
complete_timeout = 0 ;
531
541
532
- var title = _(" Completed. Next occurrence: %s " . printf (Utils . Datetime . get_default_date_format_from_date (next_recurrency)));
542
+ var title = _ (" Completed. Next occurrence: %s " . printf (Utils . Datetime . get_default_date_format_from_date (next_recurrency)));
533
543
var toast = Util . get_default (). create_toast (title, 3 );
534
544
535
545
Services . EventBus . get_default (). send_toast (toast);
@@ -546,11 +556,15 @@ public class Layouts.ItemBoard : Layouts.ItemBase {
546
556
547
557
// ItemType
548
558
if (item. item_type == ItemType . TASK ) {
549
- checked_button. sensitive = true ;
550
- checked_button. opacity = 1 ;
559
+ checked_button_revealer. reveal_child = true ;
560
+ description_label. margin_start = 30 ;
561
+ footer_box. margin_start = 30 ;
562
+ content_box. margin_start = 6 ;
551
563
} else {
552
- checked_button. sensitive = false ;
553
- checked_button. opacity = 0 ;
564
+ checked_button_revealer. reveal_child = false ;
565
+ description_label. margin_start = 9 ;
566
+ footer_box. margin_start = 9 ;
567
+ content_box. margin_start = 3 ;
554
568
}
555
569
556
570
description_label. label = Util . get_default (). line_break_to_space (item. description);
@@ -631,31 +645,31 @@ public class Layouts.ItemBoard : Layouts.ItemBase {
631
645
no_date_item. visible = false ;
632
646
}
633
647
634
- pinboard_item. title = item. pinned ? _(" Unpin" ) : _(" Pin" );
648
+ pinboard_item. title = item. pinned ? _ (" Unpin" ) : _ (" Pin" );
635
649
636
650
menu_handle_popover. pointing_to = { (int ) x, (int ) y, 1 , 1 };
637
651
menu_handle_popover. popup ();
638
652
return ;
639
653
}
640
654
641
- var today_item = new Widgets .ContextMenu .MenuItem (_(" Today" ), " star-outline-thick-symbolic" );
655
+ var today_item = new Widgets .ContextMenu .MenuItem (_ (" Today" ), " star-outline-thick-symbolic" );
642
656
today_item. secondary_text = new GLib .DateTime .now_local (). format (" %a " );
643
657
644
- var tomorrow_item = new Widgets .ContextMenu .MenuItem (_(" Tomorrow" ), " today-calendar-symbolic" );
658
+ var tomorrow_item = new Widgets .ContextMenu .MenuItem (_ (" Tomorrow" ), " today-calendar-symbolic" );
645
659
tomorrow_item. secondary_text = new GLib .DateTime .now_local (). add_days (1 ). format (" %a " );
646
660
647
- pinboard_item = new Widgets .ContextMenu .MenuItem (item. pinned ? _(" Unpin" ) : _(" Pin" ), " pin-symbolic" );
661
+ pinboard_item = new Widgets .ContextMenu .MenuItem (item. pinned ? _ (" Unpin" ) : _ (" Pin" ), " pin-symbolic" );
648
662
649
- no_date_item = new Widgets .ContextMenu .MenuItem (_(" No Date" ), " cross-large-circle-filled-symbolic" );
663
+ no_date_item = new Widgets .ContextMenu .MenuItem (_ (" No Date" ), " cross-large-circle-filled-symbolic" );
650
664
no_date_item. visible = item. has_due;
651
- var move_item = new Widgets .ContextMenu .MenuItem (_(" Move" ), " arrow3-right-symbolic" );
665
+ var move_item = new Widgets .ContextMenu .MenuItem (_ (" Move" ), " arrow3-right-symbolic" );
652
666
653
- var add_item = new Widgets .ContextMenu .MenuItem (_(" Add Subtask" ), " plus-large-symbolic" );
654
- var complete_item = new Widgets .ContextMenu .MenuItem (_(" Complete" ), " check-round-outline-symbolic" );
655
- var edit_item = new Widgets .ContextMenu .MenuItem (_(" Edit" ), " edit-symbolic" );
656
- var duplicate_item = new Widgets .ContextMenu .MenuItem (_(" Duplicate" ), " tabs-stack-symbolic" );
667
+ var add_item = new Widgets .ContextMenu .MenuItem (_ (" Add Subtask" ), " plus-large-symbolic" );
668
+ var complete_item = new Widgets .ContextMenu .MenuItem (_ (" Complete" ), " check-round-outline-symbolic" );
669
+ var edit_item = new Widgets .ContextMenu .MenuItem (_ (" Edit" ), " edit-symbolic" );
670
+ var duplicate_item = new Widgets .ContextMenu .MenuItem (_ (" Duplicate" ), " tabs-stack-symbolic" );
657
671
658
- var delete_item = new Widgets .ContextMenu .MenuItem (_(" Delete Task" ), " user-trash-symbolic" );
672
+ var delete_item = new Widgets .ContextMenu .MenuItem (_ (" Delete Task" ), " user-trash-symbolic" );
659
673
delete_item. add_css_class (" menu-item-danger" );
660
674
661
675
var menu_box = new Gtk .Box (Gtk . Orientation . VERTICAL , 0 );
@@ -940,7 +954,7 @@ public class Layouts.ItemBoard : Layouts.ItemBase {
940
954
if (item. project. sort_order != 0 ) {
941
955
item. project. sort_order = 0 ;
942
956
Services . EventBus . get_default (). send_toast (
943
- Util . get_default (). create_toast (_(" Order changed to 'Custom sort order'" ))
957
+ Util . get_default (). create_toast (_ (" Order changed to 'Custom sort order'" ))
944
958
);
945
959
item. project. update_local ();
946
960
}
@@ -1039,8 +1053,8 @@ public class Layouts.ItemBoard : Layouts.ItemBase {
1039
1053
}
1040
1054
1041
1055
private void delete_undo () {
1042
- var toast = new Adw .Toast (_(" %s was deleted" . printf (Util . get_default (). get_short_name (item. content))));
1043
- toast. button_label = _(" Undo" );
1056
+ var toast = new Adw .Toast (_ (" %s was deleted" . printf (Util . get_default (). get_short_name (item. content))));
1057
+ toast. button_label = _ (" Undo" );
1044
1058
toast. priority = Adw . ToastPriority . HIGH ;
1045
1059
toast. timeout = 3 ;
1046
1060
0 commit comments