File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Userland/Libraries/LibGUI Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -754,13 +754,10 @@ void TextEditor::paint_event(PaintEvent& event)
754
754
755
755
Optional<UISize> TextEditor::calculated_min_size () const
756
756
{
757
- auto margins = content_margins ();
758
- int horizontal = margins.left () + margins.right (),
759
- vertical = margins.top () + margins.bottom ();
760
- int vertical_content_size = font ().glyph_height () + 4 ;
761
- if (!is_multi_line () && m_icon)
762
- vertical_content_size = max (vertical_content_size, icon_size () + 2 );
763
- return UISize (horizontal, vertical);
757
+ if (is_multi_line ())
758
+ return AbstractScrollableWidget::calculated_min_size ();
759
+ auto m = content_margins ();
760
+ return UISize { m.left () + m.right (), m.top () + m.bottom () };
764
761
}
765
762
766
763
void TextEditor::select_all ()
You can’t perform that action at this time.
0 commit comments