aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ui_components.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-01-01 10:08:40 +0000
committerAUTOMATIC <16777216c@gmail.com>2023-01-01 10:08:40 +0000
commite5f1a37cb9b537d95b2df47c96b4a4f7242fd294 (patch)
tree21bd3560ed8bc561745b77a3f39ad927c48e0486 /modules/ui_components.py
parentb46b97fa297b3a4a654da77cf98a775a2bcab4c7 (diff)
downloadstable-diffusion-webui-gfx803-e5f1a37cb9b537d95b2df47c96b4a4f7242fd294.tar.gz
stable-diffusion-webui-gfx803-e5f1a37cb9b537d95b2df47c96b4a4f7242fd294.tar.bz2
stable-diffusion-webui-gfx803-e5f1a37cb9b537d95b2df47c96b4a4f7242fd294.zip
make refresh buttons look more nice
Diffstat (limited to 'modules/ui_components.py')
-rw-r--r--modules/ui_components.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/ui_components.py b/modules/ui_components.py
new file mode 100644
index 00000000..d0519d2d
--- /dev/null
+++ b/modules/ui_components.py
@@ -0,0 +1,18 @@
+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"