From 8d197b6a92fbcea8e3394159247c19cea080c975 Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Sat, 17 Sep 2022 16:28:19 +0300 Subject: [PATCH] added user.css support --- .gitignore | 1 + modules/ui.py | 5 +++++ style.css | 3 --- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 1dffb108e..4f830e61b 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ __pycache__ /webui-user.bat /webui-user.sh /interrogate +/user.css diff --git a/modules/ui.py b/modules/ui.py index 960f1e362..b97ffd075 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -801,6 +801,11 @@ def create_ui(txt2img, img2img, run_extras, run_pnginfo): with open(os.path.join(script_path, "style.css"), "r", encoding="utf8") as file: css = file.read() + if os.path.exists(os.path.join(script_path, "style.css")): + with open(os.path.join(script_path, "user.css"), "r", encoding="utf8") as file: + usercss = file.read() + css += usercss + if not cmd_opts.no_progressbar_hiding: css += css_hide_progressbar diff --git a/style.css b/style.css index 2bdd1e0e3..36d073faf 100644 --- a/style.css +++ b/style.css @@ -21,9 +21,6 @@ min-height: 4.5em; } -#txt2img_gallery, #img2img_gallery{ - min-height: 768px; -} #txt2img_gallery img, #img2img_gallery img{ object-fit: scale-down; }