Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2012-12-15 22:12:38 +0400
committerTon Roosendaal <ton@blender.org>2012-12-15 22:12:38 +0400
commitce08127caf5dc833fa9e106eeb4c33c91488b20d (patch)
tree84ff07b7129b1f82ccf8366870f0cfdf6cdcebdb /source/blender
parent468a6aba62b800efee2ece74717dd25c25a44702 (diff)
Bugfix, IRC submitted:
Color Pickers, square versions, didn't draw the 'cursor' correctly. Was missing colorprofile check.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/interface/interface_widgets.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 1d43d59da68..6d9df40f931 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -2141,10 +2141,18 @@ static void ui_draw_but_HSVCUBE(uiBut *but, const rcti *rect)
float x = 0.0f, y = 0.0f;
float *hsv = ui_block_hsv_get(but->block);
float hsv_n[3];
+ int color_profile = but->block->color_profile;
+
+ if (but->rnaprop && RNA_property_subtype(but->rnaprop) == PROP_COLOR_GAMMA)
+ color_profile = FALSE;
copy_v3_v3(hsv_n, hsv);
ui_get_but_vectorf(but, rgb);
+
+ if (color_profile && (int)but->a1 != UI_GRAD_SV)
+ ui_block_to_display_space_v3(but->block, rgb);
+
rgb_to_hsv_compat_v(rgb, hsv_n);
ui_draw_gradient(rect, hsv_n, but->a1, 1.0f);