image_browser_height_auto, #40
parent
b984cdd169
commit
a3aeb93fd7
|
|
@ -1162,7 +1162,7 @@ def create_tab(tab: ImageBrowserTab, current_gr_tab: gr.Tab):
|
|||
with gr.Column(scale=4, min_width=20):
|
||||
ranking = gr.Radio(choices=["1", "2", "3", "4", "5", "None"], label="Set ranking to", elem_id=f"{tab.base_tag}_control_image_browser_ranking", interactive=True)
|
||||
with gr.Row():
|
||||
image_gallery = gr.Gallery(show_label=False, elem_id=f"{tab.base_tag}_image_browser_gallery").style(grid=opts.image_browser_page_columns)
|
||||
image_gallery = gr.Gallery(show_label=False, elem_id=f"{tab.base_tag}_image_browser_gallery").style(columns=opts.image_browser_page_columns, height=("max-content" if opts.image_browser_height_auto else None))
|
||||
with gr.Row() as delete_panel:
|
||||
with gr.Column(scale=1):
|
||||
delete_num = gr.Number(value=1, interactive=True, label="delete next", elem_id=f"{tab.base_tag}_image_browser_del_num")
|
||||
|
|
@ -1687,6 +1687,7 @@ def on_ui_settings():
|
|||
("image_browser_page_columns", "images_history_page_columns", 6, "Number of columns on the page"),
|
||||
("image_browser_page_rows", "images_history_page_rows", 6, "Number of rows on the page"),
|
||||
("image_browser_pages_perload", "images_history_pages_perload", 20, "Minimum number of pages per load"),
|
||||
("image_browser_height_auto", None, False, "Use automatic height for gallery (requires Gradio >= 3.36.0)"),
|
||||
("image_browser_use_thumbnail", None, False, "Use optimized images in the thumbnail interface (significantly reduces the amount of data transferred)"),
|
||||
("image_browser_thumbnail_size", None, 200, "Size of the thumbnails (px)"),
|
||||
("image_browser_swipe", None, False, "Swipe left/right navigates to the next image"),
|
||||
|
|
|
|||
Loading…
Reference in New Issue