Merge pull request #11 from G-e-n-e-v-e-n-s-i-S/margin-right-fix

take margin_right into account when determining width
This commit is contained in:
GenevensiS
2024-09-17 07:38:47 +02:00
committed by GitHub
+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