From 8b6b42b694322c374f4cc9eebd3760b742826eca Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 17 Jan 2014 00:23:00 +0100 Subject: UI: tweak menu padding and make separator line more visible. Adds some padding to the left of the icon, adds more space around the separator line and make it more visible, and add some spacing at the top and bottom of the menu. Ref T37794 Reviewed By: dingto, billrey Differential Revision: https://developer.blender.org/D223 --- source/blender/editors/interface/interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/interface/interface.c') diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 24924564ab4..ab275c8395b 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -214,7 +214,7 @@ static void ui_text_bounds_block(uiBlock *block, float offset) uiStyleFontSet(&style->widget); for (bt = block->buttons.first; bt; bt = bt->next) { - if (bt->type != SEPR) { + if (!ELEM(bt->type, SEPR, SEPRLINE)) { j = BLF_width(style->widget.uifont_id, bt->drawstr, sizeof(bt->drawstr)); if (j > i) i = j; @@ -2553,7 +2553,7 @@ void uiBlockEndAlign(uiBlock *block) int ui_but_can_align(uiBut *but) { - return !ELEM4(but->type, LABEL, OPTION, OPTIONN, SEPR); + return !ELEM5(but->type, LABEL, OPTION, OPTIONN, SEPR, SEPRLINE); } static void ui_block_do_align_but(uiBut *first, short nr) @@ -2855,7 +2855,7 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str, } /* keep track of UI_interface.h */ - if (ELEM9(but->type, BLOCK, BUT, LABEL, PULLDOWN, ROUNDBOX, LISTBOX, BUTM, SCROLL, SEPR)) {} + if (ELEM10(but->type, BLOCK, BUT, LABEL, PULLDOWN, ROUNDBOX, LISTBOX, BUTM, SCROLL, SEPR, SEPRLINE)) {} else if (but->type >= SEARCH_MENU) {} else but->flag |= UI_BUT_UNDO; -- cgit v1.2.3