aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ui.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-09-09 07:20:06 +0000
committerAUTOMATIC1111 <16777216c@gmail.com>2023-09-09 07:20:06 +0000
commit9cebe308e9f30f2a9555cf9fc43bf20652c4a619 (patch)
tree628f986129a59e66ec6d463db4c943a8c86d0858 /modules/ui.py
parent558808c748d118f5d417a0d3810c0b7e9dcf8626 (diff)
downloadstable-diffusion-webui-gfx803-9cebe308e9f30f2a9555cf9fc43bf20652c4a619.tar.gz
stable-diffusion-webui-gfx803-9cebe308e9f30f2a9555cf9fc43bf20652c4a619.tar.bz2
stable-diffusion-webui-gfx803-9cebe308e9f30f2a9555cf9fc43bf20652c4a619.zip
return apply styles to main UI
Diffstat (limited to 'modules/ui.py')
-rw-r--r--modules/ui.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/ui.py b/modules/ui.py
index b2aed7db..06aa509b 100644
--- a/modules/ui.py
+++ b/modules/ui.py
@@ -217,6 +217,7 @@ class Toprow:
with gr.Row(elem_id=f"{id_part}_tools"):
self.paste = ToolButton(value=paste_symbol, elem_id="paste", tooltip="Read generation parameters from prompt or last generation if prompt is empty into user interface.")
self.clear_prompt_button = ToolButton(value=clear_prompt_symbol, elem_id=f"{id_part}_clear_prompt", tooltip="Clear prompt")
+ self.apply_styles = ToolButton(value=ui_prompt_styles.styles_materialize_symbol, elem_id=f"{id_part}_style_apply", tooltip="Apply all selected styles to prompts.")
self.restore_progress_button = ToolButton(value=restore_progress_symbol, elem_id=f"{id_part}_restore_progress", visible=False, tooltip="Restore progress")
self.token_counter = gr.HTML(value="<span>0/75</span>", elem_id=f"{id_part}_token_counter", elem_classes=["token-counter"])
@@ -232,6 +233,7 @@ class Toprow:
)
self.ui_styles = ui_prompt_styles.UiPromptStyles(id_part, self.prompt, self.negative_prompt)
+ self.ui_styles.setup_apply_button(self.apply_styles)
self.prompt_img.change(
fn=modules.images.image_data,