[Web] Style Fixes for Gradio V3.25.0 (#1300)

This commit is contained in:
m68k-fr
2023-04-14 01:40:42 +02:00
committed by GitHub
parent 35de7e27fa
commit 1b3f468c04
6 changed files with 17 additions and 7 deletions

View File

@@ -101,6 +101,9 @@ Procedure to upgrade the dark theme:
}
/* SHARK theme */
body {
background-color: var(--background-fill-primary);
}
/* display in full width for desktop devices */
@media (min-width: 1536px)
@@ -166,14 +169,21 @@ footer {
border-radius: 0 !important;
}
/* Gallery: Remove the default square ratio thumbnail and limit images height to the container */
#gallery .thumbnail-item.thumbnail-lg {
aspect-ratio: unset;
max-height: calc(55vh - (2 * var(--spacing-lg)));
min-height: 390px
}
/* Prevent progress bar to block gallery navigation while building images (Gradio V3.19.0) */
#gallery .wrap.default {
pointer-events: none;
}
/* Import Png info box */
#txt2img_prompt_image .fixed-height {
height: var(--size-32);
#txt2img_prompt_image {
height: var(--size-32) !important;
}
/* Hide "remove buttons" from ui dropdowns */

View File

@@ -518,7 +518,7 @@ with gr.Blocks(title="Image-to-Image") as img2img_web:
label="Generated images",
show_label=False,
elem_id="gallery",
).style(grid=[2])
).style(columns=[2], object_fit="contain")
std_output = gr.Textbox(
value="Nothing to show.",
lines=1,

View File

@@ -207,7 +207,7 @@ with gr.Blocks(title="Inpainting") as inpaint_web:
label="Generated images",
show_label=False,
elem_id="gallery",
).style(grid=[2])
).style(columns=[2], object_fit="contain")
std_output = gr.Textbox(
value="Nothing to show.",
lines=1,

View File

@@ -226,7 +226,7 @@ with gr.Blocks(title="Outpainting") as outpaint_web:
label="Generated images",
show_label=False,
elem_id="gallery",
).style(grid=[2])
).style(columns=[2], object_fit="contain")
std_output = gr.Textbox(
value="Nothing to show.",
lines=1,

View File

@@ -394,7 +394,7 @@ with gr.Blocks(title="Text-to-Image") as txt2img_web:
label="Generated images",
show_label=False,
elem_id="gallery",
).style(grid=[2])
).style(columns=[2], object_fit="contain")
std_output = gr.Textbox(
value="Nothing to show.",
lines=1,

View File

@@ -204,7 +204,7 @@ with gr.Blocks(title="Upscaler") as upscaler_web:
label="Generated images",
show_label=False,
elem_id="gallery",
).style(grid=[2])
).style(columns=[2], object_fit="contain")
std_output = gr.Textbox(
value="Nothing to show.",
lines=1,