File tree Expand file tree Collapse file tree 5 files changed +23
-33
lines changed Expand file tree Collapse file tree 5 files changed +23
-33
lines changed Original file line number Diff line number Diff line change 5
5
Card ,
6
6
Column ,
7
7
Container ,
8
- GridView ,
9
8
Icon ,
10
9
ListTile ,
11
10
ResponsiveRow ,
@@ -439,13 +438,7 @@ def __init__(self, params: TViewParams):
439
438
)
440
439
]
441
440
)
442
- self .clients_container = GridView (
443
- expand = False ,
444
- max_extent = 540 ,
445
- child_aspect_ratio = 1.0 ,
446
- spacing = dimens .SPACE_STD ,
447
- run_spacing = dimens .SPACE_MD ,
448
- )
441
+ self .clients_container = views .THomeGrid ()
449
442
self .clients_to_display = {}
450
443
self .contacts = {}
451
444
self .editor = None
Original file line number Diff line number Diff line change 5
5
Card ,
6
6
Column ,
7
7
Container ,
8
- GridView ,
9
8
Icon ,
10
9
ListTile ,
11
10
ResponsiveRow ,
@@ -288,13 +287,7 @@ def __init__(self, params: TViewParams):
288
287
)
289
288
]
290
289
)
291
- self .contacts_container = GridView (
292
- expand = False ,
293
- max_extent = 540 ,
294
- child_aspect_ratio = 1.0 ,
295
- spacing = dimens .SPACE_STD ,
296
- run_spacing = dimens .SPACE_MD ,
297
- )
290
+ self .contacts_container = views .THomeGrid ()
298
291
self .contacts_to_display = {}
299
292
self .editor = None
300
293
Original file line number Diff line number Diff line change 8
8
Column ,
9
9
Container ,
10
10
ElevatedButton ,
11
- GridView ,
12
11
Icon ,
13
12
IconButton ,
14
13
ListTile ,
@@ -715,13 +714,7 @@ def __init__(self, params: TViewParams):
715
714
)
716
715
]
717
716
)
718
- self .contracts_container = GridView (
719
- expand = False ,
720
- max_extent = 540 ,
721
- child_aspect_ratio = 1.0 ,
722
- spacing = dimens .SPACE_STD ,
723
- run_spacing = dimens .SPACE_MD ,
724
- )
717
+ self .contracts_container = views .THomeGrid ()
725
718
self .contracts_to_display = {}
726
719
self .pop_up_handler = None
727
720
Original file line number Diff line number Diff line change 10
10
Dropdown ,
11
11
ElevatedButton ,
12
12
FilledButton ,
13
- OutlinedButton ,
13
+ GridView ,
14
14
Icon ,
15
15
Image ,
16
16
PopupMenuButton ,
@@ -858,3 +858,21 @@ def __init__(
858
858
destinations = destinations ,
859
859
on_change = on_change ,
860
860
)
861
+
862
+
863
+ class THomeGrid (GridView ):
864
+ """Returns a grid view used in the home screen"""
865
+
866
+ def __init__ (
867
+ self ,
868
+ expand : bool = False ,
869
+ max_extent : int = 540 ,
870
+ spacing : int = dimens .SPACE_STD ,
871
+ run_spacing : int = dimens .SPACE_STD ,
872
+ ):
873
+ return super ().__init__ (
874
+ expand = expand ,
875
+ max_extent = max_extent ,
876
+ spacing = spacing ,
877
+ run_spacing = run_spacing ,
878
+ )
Original file line number Diff line number Diff line change 9
9
Container ,
10
10
ElevatedButton ,
11
11
FontWeight ,
12
- GridView ,
13
12
Icon ,
14
13
IconButton ,
15
14
ListTile ,
@@ -629,13 +628,7 @@ def __init__(self, params):
629
628
)
630
629
]
631
630
)
632
- self .projects_container = GridView (
633
- expand = False ,
634
- max_extent = 560 ,
635
- child_aspect_ratio = 1.0 ,
636
- spacing = dimens .SPACE_STD ,
637
- run_spacing = dimens .SPACE_MD ,
638
- )
631
+ self .projects_container = views .THomeGrid (max_extent = 600 )
639
632
self .projects_to_display = {}
640
633
self .dialog = None
641
634
You can’t perform that action at this time.
0 commit comments