Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-10-11 13:28:05 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-10-11 15:20:25 +0300
commit45477efd0e25293be8721bf949409b44f7ce0cc8 (patch)
tree2a9e5d927b316b59edeb197e66050745f67101ea /source/blender/editors/interface/interface_widgets.c
parentd90eb356622931988f4b97c50d42c427f5868f20 (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/blender/editors/interface/interface_widgets.c')
-rw-r--r--source/blender/editors/interface/interface_widgets.c3
1 files changed, 2 insertions, 1 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)) {