From 074c924052fad03fd38cd50c574e828f386889e6 Mon Sep 17 00:00:00 2001 From: Alex Heller Date: Mon, 1 May 2023 04:41:29 +0200 Subject: [PATCH] Removed double empty line on hidden items This is a quick fix, needs more careful consideration --- modules/ui.py | 4 +++- style.css | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/ui.py b/modules/ui.py index d31adcbf7..04c045b9c 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -1214,7 +1214,9 @@ def create_ui(): elem_id = "setting_"+key if not is_quicksettings: - dirtyable_setting = gr.Group(elem_classes="dirtyable") + # FIXME: the visibility is only copied once initially, so if the user changes it, it won't be updated + # This can probably be fixed by using a proper wrapper element + dirtyable_setting = gr.Group(elem_classes="dirtyable", visible=(args or {}).get("visible", True)) dirtyable_setting.__enter__() dirty_indicator = gr.Button( "", diff --git a/style.css b/style.css index ac0bf75ae..f484d2c29 100644 --- a/style.css +++ b/style.css @@ -250,6 +250,10 @@ div#extras_scale_to_tab div.form{ gap: .5em; } +#settings .dirtyable.hidden { + display: none; +} + #settings .modification-indicator { width: 100%; height: 100%;