aboutsummaryrefslogtreecommitdiff
path: root/modules/ui_components.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-01-10 23:47:02 +0300
committerAUTOMATIC <16777216c@gmail.com>2023-01-10 23:47:07 +0300
commit29fb5327640465fc83111e2170c5d8aa2b15266c (patch)
treefa4d838e909108aff05fc9d275d16209784db0cc /modules/ui_components.py
parent2bd2b8b7cf5dad23bd3d70f262c99fb4bdb48cfe (diff)
change color selector in settings to be part of form
Diffstat (limited to 'modules/ui_components.py')
-rw-r--r--modules/ui_components.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/ui_components.py b/modules/ui_components.py
index cac001dc..97acff06 100644
--- a/modules/ui_components.py
+++ b/modules/ui_components.py
@@ -31,3 +31,9 @@ class FormHTML(gr.HTML, gr.components.FormComponent):
def get_block_name(self):
return "html"
+
+class FormColorPicker(gr.ColorPicker, gr.components.FormComponent):
+ """Same as gr.ColorPicker but fits inside gradio forms"""
+
+ def get_block_name(self):
+ return "colorpicker"