summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-03 11:51:45 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-03 11:51:45 +0100
commit3cde6c0432d33ccc5f2c2cd9e2419a7f4c03502a (patch)
tree179ee55d766b4fb2914f9773bc1db3330af2e49d /scene/gui
parent1545f7aff2d1e91f2cf1efd99f384172d2043cb6 (diff)
parent84d6549c75abe27232d40f973f25a3cc2bad0078 (diff)
Merge pull request #67540 from KoBeWi/hue_hue_hue
Add a separate hue gradient for OKHSL mode
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/color_mode.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/scene/gui/color_mode.cpp b/scene/gui/color_mode.cpp
index a063cd344a..308fe057c5 100644
--- a/scene/gui/color_mode.cpp
+++ b/scene/gui/color_mode.cpp
@@ -158,8 +158,7 @@ void ColorModeHSV::slider_draw(int p_which) {
right_color.a = 1;
} else if (p_which == 0) {
Ref<Texture2D> hue = color_picker->get_theme_icon(SNAME("color_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);
+ slider->draw_texture_rect(hue, Rect2(Vector2(), Vector2(size.x, margin)), false);
return;
} else {
Color s_col;
@@ -289,9 +288,8 @@ 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"));
- 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);
+ Ref<Texture2D> hue = color_picker->get_theme_icon(SNAME("color_okhsl_hue"), SNAME("ColorPicker"));
+ slider->draw_texture_rect(hue, Rect2(Vector2(), Vector2(size.x, margin)), false);
return;
}