aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-08-12 19:03:33 +0300
committerAUTOMATIC1111 <16777216c@gmail.com>2023-08-12 19:03:33 +0300
commitb2080756fcdc328292fc38998c06ccf23e53bd7e (patch)
tree1ccb6b2458a0a5d04edf525d870742ca0dfaf56e
parent9d0ec135968d80420b84ca83f7958f5fc8e534c2 (diff)
make "send to" buttons into small tool buttons
-rw-r--r--modules/ui_common.py14
-rw-r--r--style.css4
2 files changed, 11 insertions, 7 deletions
diff --git a/modules/ui_common.py b/modules/ui_common.py
index 99d19ff0..4c035f2a 100644
--- a/modules/ui_common.py
+++ b/modules/ui_common.py
@@ -137,13 +137,17 @@ Requested path was: {f}
generation_info = None
with gr.Column():
with gr.Row(elem_id=f"image_buttons_{tabname}", elem_classes="image-buttons"):
- open_folder_button = gr.Button(folder_symbol, visible=not shared.cmd_opts.hide_ui_dir_config)
+ open_folder_button = ToolButton(folder_symbol, elem_id=f'{tabname}_open_folder', visible=not shared.cmd_opts.hide_ui_dir_config, tooltip="Open images output directory.")
if tabname != "extras":
- save = gr.Button('Save', elem_id=f'save_{tabname}')
- save_zip = gr.Button('Zip', elem_id=f'save_zip_{tabname}')
-
- buttons = parameters_copypaste.create_buttons(["img2img", "inpaint", "extras"])
+ save = ToolButton('💾', elem_id=f'save_{tabname}', tooltip=f"Save the image to a dedicated directory ({shared.opts.outdir_save}).")
+ save_zip = ToolButton('🗃️', elem_id=f'save_zip_{tabname}', tooltip=f"Save zip archive with images to a dedicated directory ({shared.opts.outdir_save})")
+
+ buttons = {
+ 'img2img': ToolButton('🖼️', elem_id=f'{tabname}_send_to_img2img', tooltip="Send image and generation parameters to img2img tab."),
+ 'inpaint': ToolButton('🎨️', elem_id=f'{tabname}_send_to_inpaint', tooltip="Send image and generation parameters to img2img inpaint tab."),
+ 'extras': ToolButton('📐', elem_id=f'{tabname}_send_to_extras', tooltip="Send image and generation parameters to extras tab.")
+ }
open_folder_button.click(
fn=lambda: open_folder(shared.opts.outdir_samples or outdir),
diff --git a/style.css b/style.css
index 716126ed..dc528422 100644
--- a/style.css
+++ b/style.css
@@ -348,8 +348,8 @@ div#extras_scale_to_tab div.form{
z-index: 5;
}
-.image-buttons button{
- min-width: auto;
+.image-buttons > .form{
+ justify-content: center;
}
.infotext {