diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-21 05:48:22 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-21 05:48:46 +0000 |
commit | df595ae3135ef12c135f43ef2a0f792708aab4b3 (patch) | |
tree | 5f488f2f5cb5148b1ca1fbf050f71759824d657d /modules/ui_components.py | |
parent | b4d21e7113384bbb592bbd79bca06aeb9e4d640a (diff) | |
download | stable-diffusion-webui-gfx803-df595ae3135ef12c135f43ef2a0f792708aab4b3.tar.gz stable-diffusion-webui-gfx803-df595ae3135ef12c135f43ef2a0f792708aab4b3.tar.bz2 stable-diffusion-webui-gfx803-df595ae3135ef12c135f43ef2a0f792708aab4b3.zip |
make resize handle available to extensions
Diffstat (limited to 'modules/ui_components.py')
-rw-r--r-- | modules/ui_components.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/ui_components.py b/modules/ui_components.py index d08b2b99..55979f62 100644 --- a/modules/ui_components.py +++ b/modules/ui_components.py @@ -20,6 +20,18 @@ class ToolButton(FormComponent, gr.Button): return "button"
+class ResizeHandleRow(gr.Row):
+ """Same as gr.Row but fits inside gradio forms"""
+
+ def __init__(self, **kwargs):
+ super().__init__(**kwargs)
+
+ self.elem_classes.append("resize-handle-row")
+
+ def get_block_name(self):
+ return "row"
+
+
class FormRow(FormComponent, gr.Row):
"""Same as gr.Row but fits inside gradio forms"""
|