diff options
author | Ton Roosendaal <ton@blender.org> | 2012-11-09 14:33:42 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2012-11-09 14:33:42 +0400 |
commit | 3ce1d54e95cd7ae8bb6777497688386f9729cf96 (patch) | |
tree | dae7c3040e75fc96a447e4f7898211c21f977355 /source/blender/editors/interface/interface_widgets.c | |
parent | 98e60b2f43a20dd206994aa62f04254badcfb98c (diff) |
Bugfix #33124
User Preference setting for Color Picker type only affected the popup
version. Now it uses it for all color pickers in Panels too.
Note for UI Py team: col.template_color_wheel() function follows
the userpref - might be a need for rename here? Dunno how to handle
this. Comment noted in template code.
Diffstat (limited to 'source/blender/editors/interface/interface_widgets.c')
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index d16169f1034..feb1e95ad23 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -2059,7 +2059,7 @@ void ui_draw_gradient(rcti *rect, const float hsv[3], const int type, const floa /* old below */ - for (dx = 0.0f; dx < 1.0f; dx += color_step) { + for (dx = 0.0f; dx < 0.999f; dx += color_step) { /* 0.999 = prevent float inaccuracy for steps */ /* previous color */ copy_v3_v3(col0[0], col1[0]); copy_v3_v3(col0[1], col1[1]); @@ -2114,7 +2114,7 @@ void ui_draw_gradient(rcti *rect, const float hsv[3], const int type, const floa sx1 = rect->xmin + dx * BLI_rcti_size_x(rect); sx2 = rect->xmin + (dx + color_step) * BLI_rcti_size_x(rect); sy = rect->ymin; - dy = BLI_rcti_size_y(rect) / 3.0; + dy = (float)BLI_rcti_size_y(rect) / 3.0; glBegin(GL_QUADS); for (a = 0; a < 3; a++, sy += dy) { |