TextBoxWidget: fix some truncation ellipsis issues

Ellipsis was sometimes not displayed when text is right aligned,
because width was not updated with ellipsis size.
bump base/xtext: fix truncation ellipsis position in bidi text
so it stays nearer to previous logical order char, instead of
sometimes being thrown away to start or end of line.
reviewable/pr5742/r1
poire-z 4 years ago
parent 143c7e4131
commit a31abf79de

@ -1 +1 @@
Subproject commit 3813bb1b950abdd75a11b96e237ca9932f3dc1a5
Subproject commit 53ff64833621a1d85c04111ac7c05094f585fe0d

@ -665,7 +665,8 @@ function TextBoxWidget:_renderText(start_row_idx, end_row_idx)
-- Requested to add an ellipsis on this line
local ellipsis_width = RenderText:getEllipsisWidth(self.face)
-- no bold: xtext does synthetized bold with normal metrics
if line.width + ellipsis_width > line.targeted_width then
line.width = line.width + ellipsis_width
if line.width > line.targeted_width then
-- The ellipsis would overflow: we need to re-makeLine()
-- this line with a smaller targeted_width
line = self._xtext:makeLine(line.offset, line.targeted_width - ellipsis_width)

Loading…
Cancel
Save