From 54a4c1cf359c369c8fc16ecf0ecaa92e6f650e2f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 4 Jan 2019 09:58:03 +1100 Subject: UI: refactor layout vars out of uiFontStyle Word wrap and alignment layout args only used by UI_fontstyle_draw were vars in uiFontStyle. These were written to before drawing, so better pass as an argument. Pass uiFontStyle & uiWidgetColors as const args. --- source/blender/makesdna/DNA_userdef_types.h | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'source/blender/makesdna/DNA_userdef_types.h') diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 056b7be511e..3f3fa6819ae 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -80,24 +80,13 @@ typedef struct uiFontStyle { short uifont_id; /* saved in file, 0 is default */ short points; /* actual size depends on 'global' dpi */ short kerning; /* unfitted or default kerning value. */ - char word_wrap; /* enable word-wrap when drawing */ - char pad[5]; short italic, bold; /* style hint */ short shadow; /* value is amount of pixels blur */ short shadx, shady; /* shadow offset in pixels */ - short align; /* text align hint */ float shadowalpha; /* total alpha */ float shadowcolor; /* 1 value, typically white or black anyway */ } uiFontStyle; -/* uiFontStyle.align */ -typedef enum eFontStyle_Align { - UI_STYLE_TEXT_LEFT = 0, - UI_STYLE_TEXT_CENTER = 1, - UI_STYLE_TEXT_RIGHT = 2 -} eFontStyle_Align; - - /* this is fed to the layout engine and widget code */ typedef struct uiStyle { -- cgit v1.2.3