aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ui_components.py
diff options
context:
space:
mode:
authorRobert Barron <rubberbaron@robustspread.com>2023-08-14 07:35:17 +0000
committerRobert Barron <rubberbaron@robustspread.com>2023-08-14 07:35:17 +0000
commitd61e31bae620632c026c927cf6538180447c6918 (patch)
tree0397dcc8e741ed391164fb6b7e8e374a46f0f4ce /modules/ui_components.py
parent54f926b11d29910df9f813e2e0ea6d35c6f4a50d (diff)
parentf3b96d4998d8ca376d33efa7a4454e8c28e24255 (diff)
downloadstable-diffusion-webui-gfx803-d61e31bae620632c026c927cf6538180447c6918.tar.gz
stable-diffusion-webui-gfx803-d61e31bae620632c026c927cf6538180447c6918.tar.bz2
stable-diffusion-webui-gfx803-d61e31bae620632c026c927cf6538180447c6918.zip
Merge remote-tracking branch 'auto1111/dev' into shared-hires-prompt-test
Diffstat (limited to 'modules/ui_components.py')
-rw-r--r--modules/ui_components.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/modules/ui_components.py b/modules/ui_components.py
index bfe2fbd9..d08b2b99 100644
--- a/modules/ui_components.py
+++ b/modules/ui_components.py
@@ -87,13 +87,23 @@ class InputAccordion(gr.Checkbox):
self.accordion_id = f"input-accordion-{InputAccordion.global_index}"
InputAccordion.global_index += 1
- kwargs['elem_id'] = self.accordion_id + "-checkbox"
- kwargs['visible'] = False
- super().__init__(value, **kwargs)
+ kwargs_checkbox = {
+ **kwargs,
+ "elem_id": f"{self.accordion_id}-checkbox",
+ "visible": False,
+ }
+ super().__init__(value, **kwargs_checkbox)
self.change(fn=None, _js='function(checked){ inputAccordionChecked("' + self.accordion_id + '", checked); }', inputs=[self])
- self.accordion = gr.Accordion(kwargs.get('label', 'Accordion'), open=value, elem_id=self.accordion_id, elem_classes=['input-accordion'])
+ kwargs_accordion = {
+ **kwargs,
+ "elem_id": self.accordion_id,
+ "label": kwargs.get('label', 'Accordion'),
+ "elem_classes": ['input-accordion'],
+ "open": value,
+ }
+ self.accordion = gr.Accordion(**kwargs_accordion)
def extra(self):
"""Allows you to put something into the label of the accordion.