Codechange: Replace Alignment enum with struct

Alignment struct contains separate horizontal and vertical alignment members.
This commit is contained in:
Peter Nelson
2026-06-28 20:43:36 +01:00
committed by Peter Nelson
parent 8e637cefed
commit b4d16d319f
52 changed files with 328 additions and 295 deletions
+2 -2
View File
@@ -582,9 +582,9 @@ void TextfileWindow::AfterLoadMarkdown()
int y_offset = (top - pos) * line_height;
if (line.wrapped_width != 0) {
Rect tr = fr.WithWidth(line.wrapped_width, _current_text_dir == TD_RTL);
DrawStringMultiLineWithClipping(tr.left, tr.right, y_offset, y_offset + line.num_lines * line_height, line.text, line.colour, SA_TOP | SA_LEFT, false, FontSize::Monospace);
DrawStringMultiLineWithClipping(tr.left, tr.right, y_offset, y_offset + line.num_lines * line_height, line.text, line.colour, {AlignmentH::Start, AlignmentV::Top}, false, FontSize::Monospace);
} else {
DrawString(fr.left, fr.right, y_offset, line.text, line.colour, SA_TOP | SA_LEFT, false, FontSize::Monospace);
DrawString(fr.left, fr.right, y_offset, line.text, line.colour, {AlignmentH::Start, AlignmentV::Top}, false, FontSize::Monospace);
}
}
}