Commit b2080756 authored by AUTOMATIC1111's avatar AUTOMATIC1111
Browse files

make "send to" buttons into small tool buttons

parent 9d0ec135
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -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),
+2 −2
Original line number Diff line number Diff line
@@ -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 {