diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-10-11 13:28:05 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-10-11 15:20:25 +0300 |
commit | 45477efd0e25293be8721bf949409b44f7ce0cc8 (patch) | |
tree | 2a9e5d927b316b59edeb197e66050745f67101ea /source | |
parent | d90eb356622931988f4b97c50d42c427f5868f20 (diff) |
UI: increase spacing between icon and text.
To avoid the icon and text blending together too much, which happens with
the new monochrome and slightly bigger icons.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/outliner_draw.c | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index fba43afb609..92f5ad08f89 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -2079,6 +2079,7 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB const BIFIconID icon = (but->flag & UI_HAS_ICON) ? but->icon + but->iconadd : ICON_NONE; int icon_size_init = is_tool ? ICON_DEFAULT_HEIGHT_TOOLBAR : ICON_DEFAULT_HEIGHT; const float icon_size = icon_size_init / (but->block->aspect / UI_DPI_FAC); + const float icon_padding = 2 * UI_DPI_FAC; #ifdef USE_UI_TOOLBAR_HACK if (is_tool) { @@ -2110,7 +2111,7 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB but->block->aspect = aspect_orig; #endif - rect->xmin += icon_size; + rect->xmin += icon_size + icon_padding; } if (but->editstr || (but->drawflag & UI_BUT_TEXT_LEFT)) { diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 5cbe39773c1..1c45dc24108 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -1696,7 +1696,7 @@ static void outliner_draw_tree_element( if (!(ELEM(tselem->type, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM, TSE_ID_BASE))) { tselem_draw_icon(block, xmax, (float)startx + offsx, (float)*starty, tselem, te, alpha_fac, true); - offsx += UI_UNIT_X + 2 * ufac; + offsx += UI_UNIT_X + 4 * ufac; } else offsx += 2 * ufac; @@ -1717,13 +1717,13 @@ static void outliner_draw_tree_element( (float)startx + offsx + 2 * ufac, (float)*starty + 2 * ufac, ICON_LIBRARY_DATA_DIRECT, alpha_fac); } - offsx += UI_UNIT_X + 2 * ufac; + offsx += UI_UNIT_X + 4 * ufac; } else if (ELEM(tselem->type, 0, TSE_LAYER_COLLECTION) && ID_IS_STATIC_OVERRIDE(tselem->id)) { UI_icon_draw_alpha( (float)startx + offsx + 2 * ufac, (float)*starty + 2 * ufac, ICON_LIBRARY_DATA_OVERRIDE, alpha_fac); - offsx += UI_UNIT_X + 2 * ufac; + offsx += UI_UNIT_X + 4 * ufac; } GPU_blend(false); |