diff options
-rw-r--r-- | doc/classes/ColorPicker.xml | 3 | ||||
-rw-r--r-- | scene/gui/color_mode.cpp | 2 | ||||
-rw-r--r-- | scene/resources/default_theme/color_picker_okhsl_hue.svg | 1 | ||||
-rw-r--r-- | scene/resources/default_theme/default_theme.cpp | 1 |
4 files changed, 6 insertions, 1 deletions
diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index cd1d0b016d..7b71dbc362 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -151,6 +151,9 @@ <theme_item name="color_hue" data_type="icon" type="Texture2D"> Custom texture for the hue selection slider on the right. </theme_item> + <theme_item name="color_okhsl_hue" data_type="icon" type="Texture2D"> + Custom texture for the H slider in the OKHSL color mode. + </theme_item> <theme_item name="expanded_arrow" data_type="icon" type="Texture2D"> The icon for color preset drop down menu when expanded. </theme_item> diff --git a/scene/gui/color_mode.cpp b/scene/gui/color_mode.cpp index a063cd344a..aaba7901e4 100644 --- a/scene/gui/color_mode.cpp +++ b/scene/gui/color_mode.cpp @@ -289,7 +289,7 @@ void ColorModeOKHSL::slider_draw(int p_which) { const real_t margin = 16 * color_picker->get_theme_default_base_scale(); if (p_which == 0) { // H - Ref<Texture2D> hue = color_picker->get_theme_icon(SNAME("color_hue"), SNAME("ColorPicker")); + Ref<Texture2D> hue = color_picker->get_theme_icon(SNAME("color_okhsl_hue"), SNAME("ColorPicker")); slider->draw_set_transform(Point2(), -Math_PI / 2, Size2(1.0, 1.0)); slider->draw_texture_rect(hue, Rect2(Vector2(margin * -1, 0), Vector2(margin, size.x)), false); return; diff --git a/scene/resources/default_theme/color_picker_okhsl_hue.svg b/scene/resources/default_theme/color_picker_okhsl_hue.svg new file mode 100644 index 0000000000..dfd1d5e2b5 --- /dev/null +++ b/scene/resources/default_theme/color_picker_okhsl_hue.svg @@ -0,0 +1 @@ +<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" viewBox="0 0 1 256" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(0 256 -256 0 0 0)" gradientUnits="userSpaceOnUse" x1="0" x2="1" y1="0" y2="0"><stop offset="0" stop-color="#d70071"/><stop offset=".07142857143" stop-color="#df0020"/><stop offset=".14285714286" stop-color="#b85800"/><stop offset=".21428571429" stop-color="#9e6c00"/><stop offset=".28571428571" stop-color="#857900"/><stop offset=".35714285714" stop-color="#5c8700"/><stop offset=".42857142857" stop-color="#008e4f"/><stop offset=".5" stop-color="#008a79"/><stop offset=".57142857143" stop-color="#008793"/><stop offset=".64285714286" stop-color="#0082ae"/><stop offset=".71428571429" stop-color="#0071eb"/><stop offset=".78571428571" stop-color="#6d50ff"/><stop offset=".85714285714" stop-color="#a801f4"/><stop offset=".92857142857" stop-color="#c600b2"/><stop offset="1" stop-color="#d70071"/></linearGradient><path d="m0 0h1v256h-1z" fill="url(#a)"/></svg> diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index aa271e6f4b..b4b9542f18 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -888,6 +888,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const theme->set_icon("shape_rect_wheel", "ColorPicker", icons["picker_shape_rectangle_wheel"]); theme->set_icon("add_preset", "ColorPicker", icons["add"]); theme->set_icon("color_hue", "ColorPicker", icons["color_picker_hue"]); + theme->set_icon("color_okhsl_hue", "ColorPicker", icons["color_picker_okhsl_hue"]); theme->set_icon("sample_bg", "ColorPicker", icons["mini_checkerboard"]); theme->set_icon("overbright_indicator", "ColorPicker", icons["color_picker_overbright"]); theme->set_icon("bar_arrow", "ColorPicker", icons["color_picker_bar_arrow"]); |