[Bf-blender-cvs] [cab26abbdb0] master: UI: Correct the text alignment of the RGB/HSV/Hex toggle in the color picker
Yevgeny Makarov
noreply at git.blender.org
Sat Feb 20 18:55:13 CET 2021
Commit: cab26abbdb07fd43cd85d1decf4859f11055e484
Author: Yevgeny Makarov
Date: Sat Feb 20 18:52:53 2021 +0100
Branches: master
https://developer.blender.org/rBcab26abbdb07fd43cd85d1decf4859f11055e484
UI: Correct the text alignment of the RGB/HSV/Hex toggle in the color picker
Expanded enum items like this usually have centered text, but there are
limitations in the popup code that break this here. Add a workaround for this
limitation.
Differential Revision: https://developer.blender.org/D9854
Reviewed by: Julian Eisel
===================================================================
M source/blender/editors/interface/interface_region_color_picker.c
===================================================================
diff --git a/source/blender/editors/interface/interface_region_color_picker.c b/source/blender/editors/interface/interface_region_color_picker.c
index 82028d4e595..e68705e4321 100644
--- a/source/blender/editors/interface/interface_region_color_picker.c
+++ b/source/blender/editors/interface/interface_region_color_picker.c
@@ -565,6 +565,7 @@ static void ui_block_colorpicker(uiBlock *block,
0,
"");
UI_but_flag_disable(bt, UI_BUT_UNDO);
+ UI_but_drawflag_disable(bt, UI_BUT_TEXT_LEFT);
UI_but_func_set(bt, ui_colorpicker_create_mode_cb, bt, NULL);
bt->custom_data = cpicker;
bt = uiDefButC(block,
@@ -582,6 +583,7 @@ static void ui_block_colorpicker(uiBlock *block,
0,
"");
UI_but_flag_disable(bt, UI_BUT_UNDO);
+ UI_but_drawflag_disable(bt, UI_BUT_TEXT_LEFT);
UI_but_func_set(bt, ui_colorpicker_create_mode_cb, bt, NULL);
bt->custom_data = cpicker;
bt = uiDefButC(block,
@@ -599,6 +601,7 @@ static void ui_block_colorpicker(uiBlock *block,
0,
"");
UI_but_flag_disable(bt, UI_BUT_UNDO);
+ UI_but_drawflag_disable(bt, UI_BUT_TEXT_LEFT);
UI_but_func_set(bt, ui_colorpicker_create_mode_cb, bt, NULL);
bt->custom_data = cpicker;
UI_block_align_end(block);
More information about the Bf-blender-cvs
mailing list