Make extra networks button togglable
This commit is contained in:
parent
dfeee786f9
commit
9e23bacfbc
2 changed files with 9 additions and 2 deletions
|
@ -219,10 +219,10 @@ def create_ui(container, button, tabname):
|
||||||
|
|
||||||
def toggle_visibility(is_visible):
|
def toggle_visibility(is_visible):
|
||||||
is_visible = not 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)
|
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():
|
def refresh():
|
||||||
res = []
|
res = []
|
||||||
|
|
|
@ -968,3 +968,10 @@ footer {
|
||||||
[id*='_prompt_container'] > div {
|
[id*='_prompt_container'] > div {
|
||||||
margin: 0!important;
|
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;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue