diff options
author | Rindbee <idleman@yeah.net> | 2022-08-02 19:22:17 +0800 |
---|---|---|
committer | Rindbee <idleman@yeah.net> | 2022-08-04 11:30:03 +0800 |
commit | 7869ea236e8fd87e5a64d5301ecdfd4a9a8b664d (patch) | |
tree | d953319785c014f0c59ae62f319d8b763954f0f5 /scene | |
parent | ea4b8de2b4c06e6f18bf0470d716f787bddfecc3 (diff) |
Fix Hue slider incorrectly rotated 90 degrees in ColorPicker
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/color_mode.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/color_mode.cpp b/scene/gui/color_mode.cpp index af78d67e5a..ebd86e0937 100644 --- a/scene/gui/color_mode.cpp +++ b/scene/gui/color_mode.cpp @@ -159,7 +159,7 @@ void ColorModeHSV::slider_draw(int p_which) { } 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 * -2, 0), Vector2(slider->get_size().x, margin)), false, Color(1, 1, 1), true); + slider->draw_texture_rect(hue, Rect2(Vector2(margin * -2, 0), Vector2(margin, size.x)), false); return; } else { Color s_col; @@ -306,7 +306,7 @@ void ColorModeOKHSL::slider_draw(int p_which) { } 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 * -2, 0), Vector2(slider->get_size().x, margin)), false, Color(1, 1, 1), true); + slider->draw_texture_rect(hue, Rect2(Vector2(margin * -2, 0), Vector2(margin, size.x)), false); return; } else { Color s_col; |