mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
LibGUI: Use new layout system for basic widgets
This commit is contained in:
parent
bfbaad9f41
commit
19fac58e49
17 changed files with 85 additions and 18 deletions
|
@ -743,6 +743,17 @@ void TextEditor::paint_event(PaintEvent& event)
|
|||
painter.fill_rect(cursor_content_rect(), palette().text_cursor());
|
||||
}
|
||||
|
||||
Optional<UISize> TextEditor::calculated_min_size() const
|
||||
{
|
||||
auto margins = content_margins();
|
||||
int horizontal = margins.left() + margins.right(),
|
||||
vertical = margins.top() + margins.bottom();
|
||||
int vertical_content_size = font().glyph_height() + 4;
|
||||
if (!is_multi_line() && m_icon)
|
||||
vertical_content_size = max(vertical_content_size, icon_size() + 2);
|
||||
return UISize(horizontal, vertical);
|
||||
}
|
||||
|
||||
void TextEditor::select_all()
|
||||
{
|
||||
TextPosition start_of_document { 0, 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue