diff options
author | Hans Goudey <h.goudey@me.com> | 2020-12-19 19:07:13 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-12-19 19:07:20 +0300 |
commit | 09be4a0917fbdb391341a6bfcc1e918fb75d0fd2 (patch) | |
tree | c2d9ed3accc9f92281752fc98a725c32cb1cbb5d /source/blender/editors/interface/interface_layout.c | |
parent | a5a302bd18061e833c4d629fffd06f57e7447d39 (diff) |
Cleanup: Use typedef for UI emboss type enum
Previously both `char` and `int` were used to represent this enum.
Differential Revision: https://developer.blender.org/D9903
Diffstat (limited to 'source/blender/editors/interface/interface_layout.c')
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 3b366688e59..3ea7a5f5973 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -172,7 +172,7 @@ struct uiLayout { /** For layouts inside gridflow, they and their items shall never have a fixed maximal size. */ bool variable_size; char alignment; - char emboss; + eUIEmbossType emboss; /** for fixed width or height to avoid UI size changes */ float units[2]; }; @@ -1189,7 +1189,7 @@ static uiBut *uiItemFullO_ptr_ex(uiLayout *layout, const int w = ui_text_icon_width(layout, name, icon, 0); - const int prev_emboss = layout->emboss; + const eUIEmbossType prev_emboss = layout->emboss; if (flag & UI_ITEM_R_NO_BG) { layout->emboss = UI_EMBOSS_NONE; } @@ -2120,7 +2120,7 @@ void uiItemFullR(uiLayout *layout, int w, h; ui_item_rna_size(layout, name, icon, ptr, prop, index, icon_only, compact, &w, &h); - const int prev_emboss = layout->emboss; + const eUIEmbossType prev_emboss = layout->emboss; if (no_bg) { layout->emboss = UI_EMBOSS_NONE; } @@ -4914,7 +4914,7 @@ void uiLayoutSetUnitsY(uiLayout *layout, float unit) layout->units[1] = unit; } -void uiLayoutSetEmboss(uiLayout *layout, char emboss) +void uiLayoutSetEmboss(uiLayout *layout, eUIEmbossType emboss) { layout->emboss = emboss; } @@ -4999,7 +4999,7 @@ float uiLayoutGetUnitsY(uiLayout *layout) return layout->units[1]; } -int uiLayoutGetEmboss(uiLayout *layout) +eUIEmbossType uiLayoutGetEmboss(uiLayout *layout) { if (layout->emboss == UI_EMBOSS_UNDEFINED) { return layout->root->block->emboss; |