take margin_right into account when determining width

This commit is contained in:
GenevensiS
2024-09-13 03:43:16 +02:00
parent 4767332060
commit 6a0476929e
+1 -1
View File
@@ -613,7 +613,7 @@ bool TextViewer::prepareLinesAtScale(RotatedDC& dc, const vector<CharInfo>& char
}
// Did the word become too long?
if (!break_now) {
double max_width = lineRight(dc, style, line.top);
double max_width = lineRight(dc, style, line.top) - line.margin_right;
if (line_size.width + word_size.width > max_width) {
if (!style.field().multi_line) {
// single line word does not fit