UI: Fix text padding for labels without an icon
This commit is contained in:
parent
c6143da27c
commit
a3d5b949d2
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue