diff options
author | Philpax <me@philpax.me> | 2023-01-05 04:00:58 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-05 04:00:58 +0000 |
commit | 83ca8dd0c96e3cc8dd444e8d980c07718dc647ee (patch) | |
tree | cbadd09c9305099db7763532b7aaf909d366d326 /modules/ui_components.py | |
parent | fa931733f6acc94e058a1d3d4655846e33ae34be (diff) | |
parent | 5f4fa942b8ec3ed3b15a352903489d6f9e6eb46e (diff) | |
download | stable-diffusion-webui-gfx803-83ca8dd0c96e3cc8dd444e8d980c07718dc647ee.tar.gz stable-diffusion-webui-gfx803-83ca8dd0c96e3cc8dd444e8d980c07718dc647ee.tar.bz2 stable-diffusion-webui-gfx803-83ca8dd0c96e3cc8dd444e8d980c07718dc647ee.zip |
Merge branch 'AUTOMATIC1111:master' into fix-sd-arch-switch-in-override-settings
Diffstat (limited to 'modules/ui_components.py')
-rw-r--r-- | modules/ui_components.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/ui_components.py b/modules/ui_components.py new file mode 100644 index 00000000..91eb0e3d --- /dev/null +++ b/modules/ui_components.py @@ -0,0 +1,25 @@ +import gradio as gr
+
+
+class ToolButton(gr.Button, gr.components.FormComponent):
+ """Small button with single emoji as text, fits inside gradio forms"""
+
+ def __init__(self, **kwargs):
+ super().__init__(variant="tool", **kwargs)
+
+ def get_block_name(self):
+ return "button"
+
+
+class FormRow(gr.Row, gr.components.FormComponent):
+ """Same as gr.Row but fits inside gradio forms"""
+
+ def get_block_name(self):
+ return "row"
+
+
+class FormGroup(gr.Group, gr.components.FormComponent):
+ """Same as gr.Row but fits inside gradio forms"""
+
+ def get_block_name(self):
+ return "group"
|