From b29f7c2fe8f39a4f1a4cfa15cac130c9c94605ae Mon Sep 17 00:00:00 2001 From: Flynn Garthwaite Date: Sat, 19 Nov 2022 09:26:39 +1300 Subject: Fixed orientation of HSV rectangle vertical slider --- scene/gui/color_picker.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scene') diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index 724e5bcaf6..d68aa053e2 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -1088,7 +1088,9 @@ void ColorPicker::_hsv_draw(int p_which, Control *c) { } else if (p_which == 1) { if (actual_shape == SHAPE_HSV_RECTANGLE) { Ref hue = get_theme_icon(SNAME("color_hue"), SNAME("ColorPicker")); - c->draw_texture_rect(hue, Rect2(Point2(), c->get_size())); + c->draw_set_transform(Point2(), -Math_PI / 2, Size2(c->get_size().x, -c->get_size().y)); + c->draw_texture_rect(hue, Rect2(Point2(), Size2(1, 1))); + c->draw_set_transform(Point2(), 0, Size2(1, 1)); int y = c->get_size().y - c->get_size().y * (1.0 - h); Color col; col.set_hsv(h, 1, 1); -- cgit v1.2.3