mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-20 09:00:51 -08:00
Requested changes
This commit is contained in:
parent
867be74244
commit
5afc44aab1
3 changed files with 11 additions and 16 deletions
|
|
@ -665,20 +665,19 @@ def reload_gradio_theme(theme_name=None):
|
|||
if not theme_name:
|
||||
theme_name = opts.gradio_theme
|
||||
|
||||
default_theme_args = dict(
|
||||
font=["Source Sans Pro", 'ui-sans-serif', 'system-ui', 'sans-serif'],
|
||||
font_mono=['IBM Plex Mono', 'ui-monospace', 'Consolas', 'monospace'],
|
||||
)
|
||||
|
||||
if theme_name == "Default":
|
||||
gradio_theme = gr.themes.Default(
|
||||
font=['Helvetica', 'ui-sans-serif', 'system-ui', 'sans-serif'],
|
||||
font_mono=['IBM Plex Mono', 'ui-monospace', 'Consolas', 'monospace'],
|
||||
)
|
||||
gradio_theme = gr.themes.Default(**default_theme_args)
|
||||
else:
|
||||
try:
|
||||
gradio_theme = gr.themes.ThemeClass.from_hub(theme_name)
|
||||
except Exception as e:
|
||||
errors.display(e, "changing gradio theme")
|
||||
gradio_theme = gr.themes.Default(
|
||||
font=['Helvetica', 'ui-sans-serif', 'system-ui', 'sans-serif'],
|
||||
font_mono=['IBM Plex Mono', 'ui-monospace', 'Consolas', 'monospace'],
|
||||
)
|
||||
gradio_theme = gr.themes.Default(**default_theme_args)
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue