From eb0b84c5643896385ba6dd242c6815b288618355 Mon Sep 17 00:00:00 2001 From: Andray Date: Thu, 29 Feb 2024 16:02:21 +0400 Subject: [PATCH] make minimal width 2 times smaller then default --- html/extra-networks-pane.html | 2 +- javascript/resizeHandle.js | 2 +- modules/shared_options.py | 2 +- modules/ui_extra_networks.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/html/extra-networks-pane.html b/html/extra-networks-pane.html index f54344aaa..02a871086 100644 --- a/html/extra-networks-pane.html +++ b/html/extra-networks-pane.html @@ -45,7 +45,7 @@
-
+
{tree_html}
diff --git a/javascript/resizeHandle.js b/javascript/resizeHandle.js index 4fe9cbdff..513198f53 100644 --- a/javascript/resizeHandle.js +++ b/javascript/resizeHandle.js @@ -65,7 +65,7 @@ parent.needHideOnMoblie = true; } else { leftColTemplate = parent.children[0].style.flexBasis; - parent.minLeftColWidth = parent.children[0].style.flexBasis.slice(0, -2); + parent.minLeftColWidth = parent.children[0].style.flexBasis.slice(0, -2) / 2; parent.minRightColWidth = 0; parent.needHideOnMoblie = false; } diff --git a/modules/shared_options.py b/modules/shared_options.py index 285c54158..aa26588df 100644 --- a/modules/shared_options.py +++ b/modules/shared_options.py @@ -258,7 +258,7 @@ options_templates.update(options_section(('extra_networks', "Extra Networks", "s "extra_networks_card_order_field": OptionInfo("Path", "Default order field for Extra Networks cards", gr.Dropdown, {"choices": ['Path', 'Name', 'Date Created', 'Date Modified']}).needs_reload_ui(), "extra_networks_card_order": OptionInfo("Ascending", "Default order for Extra Networks cards", gr.Dropdown, {"choices": ['Ascending', 'Descending']}).needs_reload_ui(), "extra_networks_tree_view_default_enabled": OptionInfo(False, "Enables the Extra Networks directory tree view by default").needs_reload_ui(), - "extra_networks_tree_view_min_width": OptionInfo(180, "Minimal width for the Extra Networks directory tree view", gr.Number).needs_reload_ui(), + "extra_networks_tree_view_default_width": OptionInfo(180, "Default width for the Extra Networks directory tree view", gr.Number).needs_reload_ui(), "extra_networks_add_text_separator": OptionInfo(" ", "Extra networks separator").info("extra text to add before <...> when adding extra network to prompt"), "ui_extra_networks_tab_reorder": OptionInfo("", "Extra networks tab order").needs_reload_ui(), "textual_inversion_print_at_load": OptionInfo(False, "Print a list of Textual Inversion embeddings when loading model"), diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py index 9d8f8b28b..ad2c23054 100644 --- a/modules/ui_extra_networks.py +++ b/modules/ui_extra_networks.py @@ -550,7 +550,7 @@ class ExtraNetworksPage: "tree_view_div_extra_class": tree_view_div_extra_class, "tree_html": self.create_tree_view_html(tabname), "items_html": self.create_card_view_html(tabname, none_message="Loading..." if empty else None), - "extra_networks_tree_view_min_width": shared.opts.extra_networks_tree_view_min_width, + "extra_networks_tree_view_default_width": shared.opts.extra_networks_tree_view_default_width, "tree_view_div_default_display": tree_view_div_default_display, "extra_network_pane_content_default_display": extra_network_pane_content_default_display, }