diff --git a/home/code_setup.py b/home/code_setup.py index 4838d10..5dd704f 100644 --- a/home/code_setup.py +++ b/home/code_setup.py @@ -8,8 +8,8 @@ CONFIG = { "column_widths": { "Full Label": "25%", - "Executable Path": "70%", - "Hide": "5%", + "Executable Path": "65%", + "Hide": "10%", }, "cell_style": {"padding": "2px 5px"}, "rows_per_page": 10, @@ -199,9 +199,22 @@ def render_table_with_filters(): table_output = ipw.Output() + search_box = ipw.Text( + description="Search:", + placeholder="Filter by label or path...", + layout=ipw.Layout(width="50%"), + style={"description_width": "initial"}, + ) + search_box.observe( + on_search_change, + "value", + ) + show_hidden_only_button = ipw.Checkbox( value=False, + indent=False, description="Show hidden codes only", + layout=ipw.Layout(width="fit-content", margin="2px 10px 2px auto"), ) show_hidden_only_button.observe( on_show_hidden_click, @@ -212,26 +225,17 @@ def render_table_with_filters(): description="Show All", tooltip="Unhide all hidden codes", button_style="primary", - layout=ipw.Layout(margin="0 0 0 auto"), + layout=ipw.Layout(margin="0", width="105px"), ) show_all_button.on_click(on_show_all_click) - search_box = ipw.Text( - description="Search:", - placeholder="Filter by label or path...", - layout=ipw.Layout(width="50%"), - ) - search_box.observe( - on_search_change, - "value", - ) - filters = ipw.HBox( children=[ search_box, show_hidden_only_button, show_all_button, ], + layout=ipw.Layout(padding="0 8px", align_items="center"), ) pagination = ipw.HBox(layout=ipw.Layout(justify_content="center"))