update button pressed down style for #8569

This commit is contained in:
AUTOMATIC
2023-03-27 08:05:55 +03:00
parent a7d6fc3b42
commit a70ae917ea
2 changed files with 13 additions and 8 deletions

View File

@@ -252,7 +252,7 @@ def create_ui(container, button, tabname):
def toggle_visibility(is_visible):
is_visible = not is_visible
return is_visible, gr.update(visible=is_visible), gr.update(variant=("primary" if is_visible else "tool"))
return is_visible, gr.update(visible=is_visible), gr.update(variant=("secondary-down" if is_visible else "secondary"))
state_visible = gr.State(value=False)
button.click(fn=toggle_visibility, inputs=[state_visible], outputs=[state_visible, container, button])