diff --git a/modules/ui_prompt_styles.py b/modules/ui_prompt_styles.py index 31090fb2..c17abc82 100644 --- a/modules/ui_prompt_styles.py +++ b/modules/ui_prompt_styles.py @@ -2,9 +2,9 @@ import gradio as gr from modules import shared, ui_common, ui_components, styles -styles_edit_symbol = '\U0001f58c\uFE0F' # 🖌️ -styles_materialize_symbol = '\U0001f4cb' # 📋 -styles_copy_symbol = '\U0001f4dd' # 📝 +styles_edit_symbol = "\U0001f58c\ufe0f" # 🖌️ +styles_materialize_symbol = "\U0001f4cb" # 📋 +styles_copy_symbol = "\U0001f4dd" # 📝 def select_style(name): @@ -39,7 +39,7 @@ def delete_style(name): shared.prompt_styles.styles.pop(name, None) shared.prompt_styles.save_styles() - return '', '', '' + return "", "", "" def materialize_styles(prompt, negative_prompt, styles): @@ -71,15 +71,15 @@ class UiPromptStyles: self.copy = ui_components.ToolButton(value=styles_copy_symbol, elem_id=f"{tabname}_style_copy", tooltip="Copy main UI prompt to style.") with gr.Row(): - self.prompt = gr.Textbox(label="Prompt", show_label=True, elem_id=f"{tabname}_edit_style_prompt", lines=3, elem_classes=["prompt"]) + self.prompt = gr.Textbox(label="Prompt", show_label=True, elem_id=f"{tabname}_edit_style_prompt", lines=4, max_lines=16, elem_classes=["prompt"]) with gr.Row(): - self.neg_prompt = gr.Textbox(label="Negative prompt", show_label=True, elem_id=f"{tabname}_edit_style_neg_prompt", lines=3, elem_classes=["prompt"]) + self.neg_prompt = gr.Textbox(label="Negative prompt", show_label=True, elem_id=f"{tabname}_edit_style_neg_prompt", lines=4, max_lines=16, elem_classes=["prompt"]) with gr.Row(): - self.save = gr.Button('Save', variant='primary', elem_id=f'{tabname}_edit_style_save', visible=False) - self.delete = gr.Button('Delete', variant='primary', elem_id=f'{tabname}_edit_style_delete', visible=False) - self.close = gr.Button('Close', variant='secondary', elem_id=f'{tabname}_edit_style_close') + self.save = gr.Button("Save", variant="primary", elem_id=f"{tabname}_edit_style_save", visible=False) + self.delete = gr.Button("Delete", variant="primary", elem_id=f"{tabname}_edit_style_delete", visible=False) + self.close = gr.Button("Close", variant="secondary", elem_id=f"{tabname}_edit_style_close") self.selection.change( fn=select_style, @@ -120,4 +120,4 @@ class UiPromptStyles: inputs=[self.main_ui_prompt, self.main_ui_negative_prompt, self.dropdown], outputs=[self.main_ui_prompt, self.main_ui_negative_prompt, self.dropdown], show_progress=False, - ).then(fn=None, _js="function(){update_"+self.tabname+"_tokens(); closePopup();}", show_progress=False) + ).then(fn=None, _js="function(){update_" + self.tabname + "_tokens(); closePopup();}", show_progress=False) diff --git a/style.css b/style.css index afbef188..9222ac89 100644 --- a/style.css +++ b/style.css @@ -1267,7 +1267,8 @@ footer { } .popup-dialog { - width: 56em; + width: 60vw; + height: auto; background: var(--body-background-fill) !important; padding: 2em !important; }