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])

View File

@ -138,6 +138,18 @@ div.gradio-html.min{
border-radius: 0.5em;
}
.gradio-button.secondary-down{
background: var(--button-secondary-background-fill);
color: var(--button-secondary-text-color);
}
.gradio-button.secondary-down, .gradio-button.secondary-down:hover{
box-shadow: 1px 1px 1px rgba(0,0,0,0.25) inset, 0px 0px 3px rgba(0,0,0,0.15) inset;
}
.gradio-button.secondary-down:hover{
background: var(--button-secondary-background-fill-hover);
color: var(--button-secondary-text-color-hover);
}
.checkboxes-row{
margin-bottom: 0.5em;
margin-left: 0em;
@ -810,10 +822,3 @@ footer {
.extra-network-cards .card ul a:hover{
color: red;
}
button[id$='_extra_networks'] {
max-width: 2.2em;
min-width: 2.2em !important;
height: 2.4em;
line-height: 1em !important;
}