Commit: a3d5b949d24b0f441926ae71be837a89e4c04ac0 Author: Yevgeny Makarov Date: Sun Mar 29 22:47:41 2020 +1100 Branches: master https://developer.blender.org/rBa3d5b949d24b0f441926ae71be837a89e4c04ac0
UI: Fix text padding for labels without an icon =================================================================== M source/blender/editors/interface/interface_widgets.c M source/blender/editors/space_node/node_intern.h =================================================================== diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 7e6ef11518a..fa4a0a1e07d 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -2520,6 +2520,13 @@ static void widget_draw_text_icon(const uiFontStyle *fstyle, } } else if (but->drawflag & UI_BUT_TEXT_LEFT) { + + /* Reduce the left padding for labels without an icon. */ + if ((but->type == UI_BTYPE_LABEL) && !(but->flag & UI_HAS_ICON) && + !ui_block_is_menu(but->block)) { + text_padding /= 2; + } + rect->xmin += text_padding; } else if (but->drawflag & UI_BUT_TEXT_RIGHT) { diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h index 8c7c490b181..42439e88c96 100644 --- a/source/blender/editors/space_node/node_intern.h +++ b/source/blender/editors/space_node/node_intern.h @@ -271,7 +271,7 @@ extern const char *node_context_dir[]; #define NODE_SOCKDY (0.08f * U.widget_unit) #define NODE_WIDTH(node) (node->width * UI_DPI_FAC) #define NODE_HEIGHT(node) (node->height * UI_DPI_FAC) -#define NODE_MARGIN_X (0.75f * U.widget_unit) +#define NODE_MARGIN_X (0.95f * U.widget_unit) #define NODE_SOCKSIZE (0.25f * U.widget_unit) #define NODE_RESIZE_MARGIN (0.20f * U.widget_unit) #define NODE_LINK_RESOL 12 _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs