Skip to content

Commit ef8fadf

Browse files
committed
fix ui element padding
1 parent 865c4ca commit ef8fadf

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,9 @@ def main():
161161
checkboxes = gr.CheckboxGroup(["基础功能区", "函数插件区", "浮动输入区", "输入清除键", "插件参数区"],
162162
value=["基础功能区", "函数插件区"], label="显示/隐藏功能区", elem_id='cbs').style(container=False)
163163
checkboxes_2 = gr.CheckboxGroup(["自定义菜单"],
164-
value=[], label="显示/隐藏自定义菜单", elem_id='cbs').style(container=False)
164+
value=[], label="显示/隐藏自定义菜单", elem_id='cbsc').style(container=False)
165165
dark_mode_btn = gr.Button("切换界面明暗 ☀", variant="secondary").style(size="sm")
166-
dark_mode_btn.click(None, None, None, _js=js_code_for_toggle_darkmode,
167-
)
166+
dark_mode_btn.click(None, None, None, _js=js_code_for_toggle_darkmode)
168167
with gr.Tab("帮助", elem_id="interact-panel"):
169168
gr.Markdown(help_menu_description)
170169

themes/common.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@
9494
background-color: var(--block-background-fill) !important;
9595
}
9696

97+
#cbsc {
98+
background-color: var(--block-background-fill) !important;
99+
}
100+
97101
#interact-panel .form {
98102
border: hidden
99103
}

themes/common.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,15 +483,18 @@ function audio_fn_init() {
483483
}
484484
}
485485

486-
487-
486+
function minor_ui_adjustment() {
487+
let cbsc_area = document.getElementById('cbsc');
488+
cbsc_area.style.paddingTop = '15px';
489+
}
488490

489491
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
490492
// 第 6 部分: JS初始化函数
491493
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
492494

493495
function GptAcademicJavaScriptInit(LAYOUT = "LEFT-RIGHT") {
494496
audio_fn_init();
497+
minor_ui_adjustment();
495498
chatbotIndicator = gradioApp().querySelector('#gpt-chatbot > div.wrap');
496499
var chatbotObserver = new MutationObserver(() => {
497500
chatbotContentChanged(1);

0 commit comments

Comments
 (0)