summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorVitika9 <vitika.program@gmail.com>2022-05-29 20:47:37 +0530
committerVitika9 <vitika.program@gmail.com>2022-07-06 22:11:43 +0530
commit0011d93c810148e2c5190a7355fb6f788d073db7 (patch)
treecba28526ffa2d629f467feb122211dc477cb4a8a /editor/plugins
parent136f84fc3549fa22b700d80f86216c484174ffb6 (diff)
ColorPicker Refactor
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/script_text_editor.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 05c707c065..3966e8d91a 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -1862,11 +1862,7 @@ void ScriptTextEditor::_enable_code_editor() {
// get default color picker mode from editor settings
int default_color_mode = EDITOR_GET("interface/inspector/default_color_picker_mode");
- if (default_color_mode == 1) {
- color_picker->set_hsv_mode(true);
- } else if (default_color_mode == 2) {
- color_picker->set_raw_mode(true);
- }
+ color_picker->set_color_mode((ColorPicker::ColorModeType)default_color_mode);
int picker_shape = EDITOR_GET("interface/inspector/default_color_picker_shape");
color_picker->set_picker_shape((ColorPicker::PickerShapeType)picker_shape);