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
path: root/source
diff options
context:
space:
mode:
authorColin Basnett <cmbasnett@gmail.com>2022-08-18 03:15:27 +0300
committerCampbell Barton <campbell@blender.org>2022-08-18 04:01:53 +0300
commitf5234474bde953356c72633bd05a1c6c9f747758 (patch)
tree484803f929d8c77bf5fdfe9847f65565528e2c60 /source
parent2a2ca3292a93c224647c84916c09337ece661b5b (diff)
Fix T97618: Clipped text labels intermittently missing ellipses
The offending line was attempting to artificially add width to the length of the string in order to "avoid ellipsing text that nearly fits". The line doesn't actually appear to do anything beneficial, and it causes the nasty text bug. Old: {F13029695} New: {F13327308} Reviewed By: campbellbarton Ref D15585
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/interface/interface_widgets.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 855e72788d2..94e9e98c685 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -1524,11 +1524,6 @@ float UI_text_clip_middle_ex(const uiFontStyle *fstyle,
const size_t max_len,
const char rpart_sep)
{
- /* Add some epsilon to OK width, avoids 'ellipsing' text that nearly fits!
- * Better to have a small piece of the last char cut out,
- * than two remaining chars replaced by an ellipsis... */
- okwidth += 1.0f + UI_DPI_FAC;
-
BLI_assert(str[0]);
/* need to set this first */
@@ -1627,7 +1622,7 @@ float UI_text_clip_middle_ex(const uiFontStyle *fstyle,
strwidth = BLF_width(fstyle->uifont_id, str, max_len);
}
- BLI_assert(strwidth <= okwidth);
+ BLI_assert((strwidth <= okwidth) || (okwidth <= 0.0f));
return strwidth;
}