diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-25 22:01:36 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-25 22:02:50 +0300 |
commit | 7a67bb7018b8be7b54ece0048a22df34923efe68 (patch) | |
tree | 433d2e77fe2ed8e9fd29db15f5d5996ff7ee25fa /source/blender/editors/include | |
parent | 700012b66e87390a9eee33d4437a073cb8e42076 (diff) |
UI: workaround for text & icon alignment
Blender's icons weren't written to draw different sizes.
For now ifdef in a hack to show toolbar icons larger.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 5 | ||||
-rw-r--r-- | source/blender/editors/include/UI_interface_icons.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index a9fb328ab8b..67dd2630da3 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -1229,4 +1229,9 @@ void UI_widgetbase_draw_cache_begin(void); void UI_widgetbase_draw_cache_flush(void); void UI_widgetbase_draw_cache_end(void); +/* Special drawing for toolbar, mainly workarounds for inflexible icon sizing. */ +#define USE_TOOLBAR_HACK + +bool UI_but_is_tool(const uiBut *but); + #endif /* __UI_INTERFACE_H__ */ diff --git a/source/blender/editors/include/UI_interface_icons.h b/source/blender/editors/include/UI_interface_icons.h index 8b436942fdd..5af2bcb27a1 100644 --- a/source/blender/editors/include/UI_interface_icons.h +++ b/source/blender/editors/include/UI_interface_icons.h @@ -49,6 +49,8 @@ typedef struct IconFile { #define ICON_DEFAULT_HEIGHT 16 #define ICON_DEFAULT_WIDTH 16 +#define ICON_DEFAULT_HEIGHT_TOOLBAR 38 + #define ICON_DEFAULT_HEIGHT_SCALE ((int)(UI_UNIT_Y * 0.8f)) #define ICON_DEFAULT_WIDTH_SCALE ((int)(UI_UNIT_X * 0.8f)) |