mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
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:
@@ -74,6 +74,14 @@ progress::after {
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
width: 215px;
|
width: 215px;
|
||||||
}
|
}
|
||||||
|
div:has(> #positive_prompt) {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#positive_prompt {
|
||||||
|
padding: 1px;
|
||||||
|
background: var(--background-fill-primary);
|
||||||
|
}
|
||||||
|
|
||||||
#positive_prompt textarea {
|
#positive_prompt textarea {
|
||||||
height: 80px;
|
height: 80px;
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ window.addEventListener('resize', (e) => {
|
|||||||
|
|
||||||
onUiLoaded(async () => {
|
onUiLoaded(async () => {
|
||||||
resized();
|
resized();
|
||||||
|
setTimeout(() => document.querySelector("#positive_prompt textarea").style.height = "80px");
|
||||||
});
|
});
|
||||||
|
|
||||||
function on_style_selection_blur() {
|
function on_style_selection_blur() {
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ with shared.gradio_root:
|
|||||||
with gr.Row():
|
with gr.Row():
|
||||||
with gr.Column(scale=17):
|
with gr.Column(scale=17):
|
||||||
prompt = gr.Textbox(show_label=False, placeholder="Type prompt here or paste parameters.", elem_id='positive_prompt',
|
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
|
default_prompt = modules.config.default_prompt
|
||||||
if isinstance(default_prompt, str) and default_prompt != '':
|
if isinstance(default_prompt, str) and default_prompt != '':
|
||||||
|
|||||||
Reference in New Issue
Block a user