diff options
author | Yevgeny Makarov <jenkm> | 2021-02-20 20:52:53 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-02-20 20:54:40 +0300 |
commit | cab26abbdb07fd43cd85d1decf4859f11055e484 (patch) | |
tree | c936f2bf35157c94273e9a9b3aac687aa626d7d4 /source/blender/editors/interface | |
parent | f2c0bbed1ce5270eee1332a02da02c1819bb230c (diff) |
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
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_region_color_picker.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |