feat: make textboxes (incl. positive prompt) resizable (#3074)

* feat: make textboxes (incl. positive prompt) resizable again

* wip: auto-resize positive prompt on new line

dirty approach as container is hidden and 1px padding is applied for border shadow to actually work

* feat: set row height to 84, exactly matching 3 lines for positive prompt

eliminate need for JS to resize positive prompt onUiLoaded
This commit is contained in:
Manuel Schmid
2024-06-02 13:40:42 +02:00
committed by GitHub
parent 3d43976e8e
commit ab01104d42
2 changed files with 16 additions and 12 deletions
+2 -2
View File
@@ -112,10 +112,10 @@ with shared.gradio_root:
gallery = gr.Gallery(label='Gallery', show_label=False, object_fit='contain', visible=True, height=768,
elem_classes=['resizable_area', 'main_view', 'final_gallery', 'image_gallery'],
elem_id='final_gallery')
with gr.Row(elem_classes='type_row'):
with gr.Row():
with gr.Column(scale=17):
prompt = gr.Textbox(show_label=False, placeholder="Type prompt here or paste parameters.", elem_id='positive_prompt',
container=False, autofocus=True, elem_classes='type_row', lines=1024)
autofocus=True, lines=3)
default_prompt = modules.config.default_prompt
if isinstance(default_prompt, str) and default_prompt != '':