From aeb662c1cd571a00b018454b0b45d6f51b8e28a2 Mon Sep 17 00:00:00 2001 From: fennghuang <89014758+fennghuang@users.noreply.github.com> Date: Wed, 16 Aug 2023 03:58:19 +0000 Subject: [PATCH 1/2] feat: update ui style --- scripts/image_browser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/image_browser.py b/scripts/image_browser.py index 0d75ae4..c49d7c4 100644 --- a/scripts/image_browser.py +++ b/scripts/image_browser.py @@ -1240,7 +1240,7 @@ def create_tab(tab: ImageBrowserTab, current_gr_tab: gr.Tab): else: sendto_controlnet_type = gr.Textbox(value="multiple", visible=False) with gr.Row(elem_id=f"{tab.base_tag}_image_browser_to_dir_panel", visible=False) as to_dir_panel: - with gr.Box(): + with gr.Blocks(): with gr.Row(): to_dir_path = gr.Textbox(label="Directory path") with gr.Row(): From caa4b001ef1f6550bdd656b60f1615f368501a37 Mon Sep 17 00:00:00 2001 From: fennghuang <89014758+fennghuang@users.noreply.github.com> Date: Wed, 16 Aug 2023 09:18:18 +0000 Subject: [PATCH 2/2] feat: update ui style --- scripts/image_browser.py | 3 ++- style.css | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/image_browser.py b/scripts/image_browser.py index c49d7c4..c874c2d 100644 --- a/scripts/image_browser.py +++ b/scripts/image_browser.py @@ -1231,6 +1231,7 @@ def create_tab(tab: ImageBrowserTab, current_gr_tab: gr.Tab): with gr.Row(visible=controlnet): sendto_controlnet_txt2img = gr.Button("Send to txt2img ControlNet", visible=controlnet) sendto_controlnet_img2img = gr.Button("Send to img2img ControlNet", visible=controlnet) + with gr.Row(visible=controlnet): controlnet_max = opts.data.get("control_net_max_models_num", 1) sendto_controlnet_num = gr.Dropdown([str(i) for i in range(controlnet_max)], label="ControlNet number", value="0", interactive=True, visible=(controlnet and controlnet_max > 1)) if controlnet_max is None: @@ -1240,7 +1241,7 @@ def create_tab(tab: ImageBrowserTab, current_gr_tab: gr.Tab): else: sendto_controlnet_type = gr.Textbox(value="multiple", visible=False) with gr.Row(elem_id=f"{tab.base_tag}_image_browser_to_dir_panel", visible=False) as to_dir_panel: - with gr.Blocks(): + with gr.Column(): with gr.Row(): to_dir_path = gr.Textbox(label="Directory path") with gr.Row(): diff --git a/style.css b/style.css index 6484016..7882511 100644 --- a/style.css +++ b/style.css @@ -87,3 +87,8 @@ button[id$='_image_browser_del_img_btn'] { #tab_image_browser .page-index-panel > div > div { min-width: auto } + +#tab_image_browser .gradio-dropdown ul.options li.item { + white-space: wrap; + word-break: break-all +}