mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 08:45:09 +00:00
TextEditor: Removed unnecessary use of for_each
Didn't notice that m_visual_rect existed :P
This commit is contained in:
parent
8fc2034ca1
commit
1adec6d54b
1 changed files with 2 additions and 5 deletions
|
@ -107,11 +107,8 @@ void GTextEditor::update_content_size()
|
|||
int content_width = 0;
|
||||
int content_height = 0;
|
||||
for (auto& line : m_lines) {
|
||||
line.for_each_visual_line([&](const Rect& rect, const StringView&, int) {
|
||||
content_width = max(rect.width(), content_width);
|
||||
content_height += rect.height();
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
content_width = max(line.m_visual_rect.width(), content_width);
|
||||
content_height += line.m_visual_rect.height();
|
||||
}
|
||||
content_width += m_horizontal_content_padding * 2;
|
||||
if (is_right_text_alignment(m_text_alignment))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue