From 9e23bacfbcb35f46f28539f71b2bc917276634b8 Mon Sep 17 00:00:00 2001 From: missionfloyd Date: Sun, 12 Mar 2023 17:07:03 -0600 Subject: [PATCH 1/3] Make extra networks button togglable --- modules/ui_extra_networks.py | 4 ++-- style.css | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py index 01df5e90..50e2093e 100644 --- a/modules/ui_extra_networks.py +++ b/modules/ui_extra_networks.py @@ -219,10 +219,10 @@ def create_ui(container, button, tabname): def toggle_visibility(is_visible): is_visible = not is_visible - return is_visible, gr.update(visible=is_visible) + return is_visible, gr.update(visible=is_visible), gr.update(variant=("primary" if is_visible else "tool")) state_visible = gr.State(value=False) - button.click(fn=toggle_visibility, inputs=[state_visible], outputs=[state_visible, container]) + button.click(fn=toggle_visibility, inputs=[state_visible], outputs=[state_visible, container, button]) def refresh(): res = [] diff --git a/style.css b/style.css index 2f26ad02..e82aebf3 100644 --- a/style.css +++ b/style.css @@ -968,3 +968,10 @@ footer { [id*='_prompt_container'] > div { margin: 0!important; } + +button[id$='_extra_networks'] { + margin: 0.6em 0em 0.55em 0; + max-width: 2.5em; + min-width: 2.5em !important; + height: 2.4em; +} From 575c17a8f9bc6471a7a0891b665ec42073a18049 Mon Sep 17 00:00:00 2001 From: missionfloyd Date: Wed, 15 Mar 2023 16:56:27 -0600 Subject: [PATCH 2/3] Update tooltip per Kilvoctu's suggestion --- javascript/hints.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/javascript/hints.js b/javascript/hints.js index 7f4101b2..83128497 100644 --- a/javascript/hints.js +++ b/javascript/hints.js @@ -21,8 +21,7 @@ titles = { "\u{1f5d1}": "Clear prompt", "\u{1f4cb}": "Apply selected styles to current prompt", "\u{1f4d2}": "Paste available values into the field", - "\u{1f3b4}": "Show extra networks", - + "\u{1f3b4}": "Show/hide extra networks", "Inpaint a part of image": "Draw a mask over an image, and the script will regenerate the masked area with content according to prompt", "SD upscale": "Upscale image normally, split result into tiles, improve each tile using img2img, merge whole image back", From 254ad09ef3b356cbe945ad7ca476c5dcf8d842f8 Mon Sep 17 00:00:00 2001 From: missionfloyd Date: Sat, 25 Mar 2023 15:01:10 -0600 Subject: [PATCH 3/3] Update style.css --- style.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/style.css b/style.css index bef15875..7b93811b 100644 --- a/style.css +++ b/style.css @@ -786,8 +786,8 @@ footer { } button[id$='_extra_networks'] { - margin: 0.6em 0em 0.55em 0; - max-width: 2.5em; - min-width: 2.5em !important; + max-width: 2.2em; + min-width: 2.2em !important; height: 2.4em; + line-height: 1em !important; }