1616 Row ,
1717 SnackBar ,
1818 Text ,
19+ TextButton ,
1920 TextField ,
2021 alignment ,
2122 border_radius ,
@@ -43,15 +44,18 @@ def main(page: Page):
4344 page .theme_mode = "light"
4445
4546 search_txt = TextField (
46- expand = 1 , hint_text = "Enter keyword and press search button" , autofocus = True
47+ expand = 1 ,
48+ hint_text = "Enter keyword and press search button" ,
49+ autofocus = True ,
50+ on_submit = lambda e : display_icons (e .control .value ),
4751 )
4852 search_results = GridView (
4953 expand = 1 ,
5054 runs_count = 10 ,
5155 max_extent = 150 ,
5256 spacing = 5 ,
5357 run_spacing = 5 ,
54- child_aspect_ratio = 2 ,
58+ child_aspect_ratio = 1 ,
5559 )
5660 status_bar = Text ()
5761
@@ -73,20 +77,17 @@ def display_icons(search_term: str):
7377 icon_name = icons_list [i ]
7478 icon_key = f"icons.{ icon_name .upper ()} "
7579 search_results .controls .append (
76- OutlinedButton (
80+ TextButton (
7781 content = Container (
7882 content = Column (
7983 [
80- Icon (
81- name = icon_name ,
82- ),
84+ Icon (name = icon_name , size = 30 ),
8385 Text (
8486 value = icon_name ,
85- size = 10 ,
87+ size = 12 ,
8688 width = 100 ,
87- # selectable =True,
89+ no_wrap = True ,
8890 text_align = "center" ,
89- overflow = "fade" ,
9091 color = colors .ON_SURFACE_VARIANT ,
9192 ),
9293 ],
@@ -95,10 +96,6 @@ def display_icons(search_term: str):
9596 horizontal_alignment = "center" ,
9697 ),
9798 alignment = alignment .center ,
98- padding = padding .only (left = 5 , right = 5 ),
99- # border=border.all(1, colors.BLACK26),
100- # bgcolor="#f0f0f0",
101- border_radius = border_radius .all (3 ),
10299 ),
103100 tooltip = f"{ icon_key } \n Click to copy to a clipboard" ,
104101 on_click = copy_to_clipboard ,
0 commit comments