From cab26abbdb07fd43cd85d1decf4859f11055e484 Mon Sep 17 00:00:00 2001 From: Yevgeny Makarov Date: Sat, 20 Feb 2021 18:52:53 +0100 Subject: 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 --- source/blender/editors/interface/interface_region_color_picker.c | 3 +++ 1 file changed, 3 insertions(+) (limited to '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); -- cgit v1.2.3