summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-22 08:29:12 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-22 08:29:12 +0100
commitebf4f75c54cc45b7ebb0d92ddad1121dd73792af (patch)
tree88ecd82b3e755347aa72e163cc246dad6328e324 /scene
parent6d5570d790e961e90f51405633bc9212b05d7d0b (diff)
parentb29f7c2fe8f39a4f1a4cfa15cac130c9c94605ae (diff)
Merge pull request #68855 from Cafalaarl/Cafalaarl/master
Fixed incorrect gradient orientation in HSV vertical slider
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/color_picker.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index 66c790b0d9..eb9f9039b7 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<Texture2D> 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);