From 94e1ad287b6bce2d3e6d9e3edbbc03271655482f Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Tue, 26 Dec 2023 23:45:29 +0800 Subject: [PATCH] Fix: [ALAS] Height of log-bar in daemon overview --- assets/gui/css/alas.css | 1 + assets/gui/css/dark-alas.css | 7 ++++--- assets/gui/css/light-alas.css | 7 ++++--- module/webui/app.py | 25 +++++++++++++------------ 4 files changed, 22 insertions(+), 18 deletions(-) diff --git a/assets/gui/css/alas.css b/assets/gui/css/alas.css index a0b482c68..91c5649fa 100644 --- a/assets/gui/css/alas.css +++ b/assets/gui/css/alas.css @@ -376,6 +376,7 @@ pre.rich-traceback-code { #pywebio-scope-scheduler-bar, #pywebio-scope-log-bar, #pywebio-scope-log, +#pywebio-scope-daemon-log-bar, #pywebio-scope-daemon-overview #pywebio-scope-groups { font-weight: 500; margin: 0.3125rem; diff --git a/assets/gui/css/dark-alas.css b/assets/gui/css/dark-alas.css index ba011c61e..7cdc1e819 100644 --- a/assets/gui/css/dark-alas.css +++ b/assets/gui/css/dark-alas.css @@ -133,12 +133,13 @@ pre.rich-traceback-code { color: #c9d1d9; } -#pywebio-scope-scheduler-bar, -#pywebio-scope-log-bar, -#pywebio-scope-log, #pywebio-scope-running, #pywebio-scope-pending, #pywebio-scope-waiting, +#pywebio-scope-scheduler-bar, +#pywebio-scope-log-bar, +#pywebio-scope-log, +#pywebio-scope-daemon-log-bar, #pywebio-scope-daemon-overview #pywebio-scope-groups { background-color: #2f3136; border: 1px solid #21262d; diff --git a/assets/gui/css/light-alas.css b/assets/gui/css/light-alas.css index 12651e918..ed295b88b 100644 --- a/assets/gui/css/light-alas.css +++ b/assets/gui/css/light-alas.css @@ -133,12 +133,13 @@ pre.rich-traceback-code { border: 1px solid lightgrey; } -#pywebio-scope-scheduler-bar, -#pywebio-scope-log-bar, -#pywebio-scope-log, #pywebio-scope-running, #pywebio-scope-pending, #pywebio-scope-waiting, +#pywebio-scope-scheduler-bar, +#pywebio-scope-log-bar, +#pywebio-scope-log, +#pywebio-scope-daemon-log-bar, #pywebio-scope-daemon-overview #pywebio-scope-groups { background-color: white; border: 1px solid lightgrey; diff --git a/module/webui/app.py b/module/webui/app.py index 01d44a555..1aebe46e7 100644 --- a/module/webui/app.py +++ b/module/webui/app.py @@ -617,7 +617,7 @@ class AlasGUI(Frame): [ put_scope("scheduler-bar"), put_scope("groups"), - put_scope("log-bar"), + put_scope("daemon-log-bar"), put_scope("log", [put_html("")]), ], ) @@ -631,7 +631,7 @@ class AlasGUI(Frame): [ put_scope( "_daemon_upper", - [put_scope("scheduler-bar"), put_scope("log-bar")], + [put_scope("scheduler-bar"), put_scope("daemon-log-bar")], ), put_scope("groups"), put_scope("log", [put_html("")]), @@ -660,16 +660,17 @@ class AlasGUI(Frame): scope="scheduler_btn", ) - with use_scope("log-bar"): - put_text(t("Gui.Overview.Log")).style( - "font-size: 1.25rem; margin: auto .5rem auto;" - ) - put_scope( - "log-bar-btns", - [ - put_scope("log_scroll_btn"), - ], - ) + with use_scope("daemon-log-bar"): + with use_scope("log-title"): + put_text(t("Gui.Overview.Log")).style( + "font-size: 1.25rem; margin: auto .5rem auto;" + ) + put_scope( + "log-bar-btns", + [ + put_scope("log_scroll_btn"), + ], + ) switch_log_scroll = BinarySwitchButton( label_on=t("Gui.Button.ScrollON"),