Fix ui::label stretch for lines in the middle of text ending in newline
This commit is contained in:
parent
6e289b3b90
commit
60150151df
1 changed files with 1 additions and 1 deletions
|
|
@ -577,7 +577,7 @@ namespace psemek::ui
|
|||
break;
|
||||
case halignment::stretch:
|
||||
offset[0] = bbox[0].min - line_bbox[l][0].min;
|
||||
if ((l + 1 != lines.size() && text_[lines[l].end] != '\n') && spaces > 0)
|
||||
if ((l + 1 != lines.size()) && (lines[l].end >= items.size() || !items[lines[l].end].character || !is_newline(*items[lines[l].end].character)) && spaces > 0)
|
||||
space_extra = (bbox[0].length() - line_bbox[l][0].length()) / spaces;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue