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
This commit is contained in:
Manuel Schmid 2024-06-02 01:50:42 +02:00
parent 50deba85e7
commit 6e555fa35a
No known key found for this signature in database
GPG Key ID: 32C4F7569B40B84B
3 changed files with 10 additions and 1 deletions

View File

@ -74,6 +74,14 @@ progress::after {
text-align: right;
width: 215px;
}
div:has(> #positive_prompt) {
border: none;
}
#positive_prompt {
padding: 1px;
background: var(--background-fill-primary);
}
#positive_prompt textarea {
height: 80px;

View File

@ -55,6 +55,7 @@ window.addEventListener('resize', (e) => {
onUiLoaded(async () => {
resized();
setTimeout(() => document.querySelector("#positive_prompt textarea").style.height = "80px");
});
function on_style_selection_blur() {

View File

@ -115,7 +115,7 @@ with shared.gradio_root:
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, lines=1024)
autofocus=True, lines=3)
default_prompt = modules.config.default_prompt
if isinstance(default_prompt, str) and default_prompt != '':