diff options
author | catboxanon <122327233+catboxanon@users.noreply.github.com> | 2023-05-13 12:57:32 +0000 |
---|---|---|
committer | catboxanon <122327233+catboxanon@users.noreply.github.com> | 2023-05-13 12:57:32 +0000 |
commit | 5afc44aab14819afea87b2f36c2f76dc43d3e83c (patch) | |
tree | f5c74d8995bbe7f45f1ee7c56a72f41c9a158ecd /modules/shared.py | |
parent | 867be74244dc725fcf2685018b97501e83a16235 (diff) | |
download | stable-diffusion-webui-gfx803-5afc44aab14819afea87b2f36c2f76dc43d3e83c.tar.gz stable-diffusion-webui-gfx803-5afc44aab14819afea87b2f36c2f76dc43d3e83c.tar.bz2 stable-diffusion-webui-gfx803-5afc44aab14819afea87b2f36c2f76dc43d3e83c.zip |
Requested changes
Diffstat (limited to 'modules/shared.py')
-rw-r--r-- | modules/shared.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/modules/shared.py b/modules/shared.py index b09b384e..96a20a6b 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -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)
|