diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-01-03 18:47:59 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-01-03 18:49:07 +0400 |
commit | 56a531eb29bb9ec2e4687645bd22f832054e635f (patch) | |
tree | de622503a026744df242b69e8fec915e910dfd6c /source/blender/editors/interface/interface_widgets.c | |
parent | ba8d65a9a7a0fbcf49dbfcd15625a75062f6d302 (diff) |
Fix T38043: Text clipping when it shouldn't
Tweak some more 'middle clipping' (zoom issues).
Diffstat (limited to 'source/blender/editors/interface/interface_widgets.c')
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 6139130d899..3976034e348 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -812,7 +812,7 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol) /* *********************** text/icon ************************************** */ -#define UI_TEXT_CLIP_MARGIN (0.25f * U.widget_unit / but->block->aspect) +#define UI_TEXT_CLIP_MARGIN (0.22f * U.widget_unit / but->block->aspect) #define PREVIEW_PAD 4 @@ -994,7 +994,7 @@ static void ui_text_clip_middle(uiFontStyle *fstyle, uiBut *but, const rcti *rec const float sep_strwidth = BLF_width(fstyle->uifont_id, sep, sep_len + 1); const float parts_strwidth = ((float)okwidth - sep_strwidth) / 2.0f; - if (parts_strwidth < (float)UI_DPI_ICON_SIZE) { + if (parts_strwidth < (float)(UI_DPI_ICON_SIZE) / but->block->aspect * 1.5) { /* If we really have no place, only show start of string. */ l_end = BLF_width_to_strlen(fstyle->uifont_id, but->drawstr, max_len, okwidth, &strwidth); but->drawstr[l_end] = '\0'; |