mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-07 07:33:47 +00:00
UI: Modernize the Gradio theme
This commit is contained in:
parent
9d02d3a13b
commit
dff8903b03
3 changed files with 68 additions and 33 deletions
|
|
@ -66,7 +66,8 @@ theme = gr.themes.Default(
|
|||
if not shared.args.old_colors:
|
||||
theme = theme.set(
|
||||
# General Colors
|
||||
border_color_primary='#c5c5d2',
|
||||
border_color_primary='#d2d2d8',
|
||||
block_border_color='transparent',
|
||||
body_text_color_subdued='#484848',
|
||||
background_fill_secondary='#eaeaea',
|
||||
background_fill_secondary_dark='var(--selected-item-color-dark, #282930)',
|
||||
|
|
@ -77,6 +78,12 @@ if not shared.args.old_colors:
|
|||
body_text_color='rgb(64, 64, 64)',
|
||||
button_secondary_background_fill="white",
|
||||
button_secondary_border_color="var(--border-color-primary)",
|
||||
block_title_text_color='*body_text_color',
|
||||
button_primary_background_fill='#374151',
|
||||
button_primary_background_fill_hover='#4b5563',
|
||||
button_primary_background_fill_hover_dark='rgba(255, 255, 255, 0.05)',
|
||||
button_primary_border_color='#374151',
|
||||
button_primary_text_color='white',
|
||||
input_shadow="none",
|
||||
button_shadow_hover="none",
|
||||
|
||||
|
|
@ -85,11 +92,11 @@ if not shared.args.old_colors:
|
|||
checkbox_background_color_dark='var(--darker-gray, #1C1C1D)',
|
||||
block_background_fill_dark='transparent',
|
||||
block_border_color_dark='transparent',
|
||||
input_border_color_dark='var(--border-color-dark, #525252)',
|
||||
input_border_color_focus_dark='var(--border-color-dark, #525252)',
|
||||
checkbox_border_color_dark='var(--border-color-dark, #525252)',
|
||||
border_color_primary_dark='var(--border-color-dark, #525252)',
|
||||
button_secondary_border_color_dark='var(--border-color-dark, #525252)',
|
||||
input_border_color_dark='var(--border-color-dark)',
|
||||
input_border_color_focus_dark='var(--border-color-dark)',
|
||||
checkbox_border_color_dark='rgba(255, 255, 255, 0.2)',
|
||||
border_color_primary_dark='var(--border-color-dark)',
|
||||
button_secondary_border_color_dark='var(--border-color-dark)',
|
||||
body_background_fill_dark='var(--dark-gray, #212125)',
|
||||
button_primary_background_fill_dark='transparent',
|
||||
button_secondary_background_fill_dark='transparent',
|
||||
|
|
@ -107,10 +114,11 @@ if not shared.args.old_colors:
|
|||
block_shadow_dark='none',
|
||||
input_shadow_focus='none',
|
||||
input_shadow_focus_dark='none',
|
||||
button_large_radius='0.375rem',
|
||||
button_large_radius='0.75rem',
|
||||
button_large_padding='6px 12px',
|
||||
input_radius='0.375rem',
|
||||
block_radius='0',
|
||||
input_radius='0.5rem',
|
||||
block_radius='0.375rem',
|
||||
button_transition='background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease',
|
||||
)
|
||||
|
||||
if (shared.user_data_dir / "notification.mp3").exists():
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ def create_ui():
|
|||
|
||||
with gr.Column():
|
||||
gr.Markdown("## Extensions & flags")
|
||||
shared.gradio['save_settings'] = gr.Button(f'Save extensions settings to {shared.user_data_dir}/settings.yaml', elem_classes='refresh-button', interactive=not mu)
|
||||
shared.gradio['save_settings'] = gr.Button(f'Save extensions settings to {shared.user_data_dir}/settings.yaml', interactive=not mu)
|
||||
shared.gradio['reset_interface'] = gr.Button("Apply flags/extensions and restart", interactive=not mu)
|
||||
with gr.Row():
|
||||
with gr.Column():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue