mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-24 00:24:38 +00:00
LibGUI: Improve calculated_min_size() for single-line TextEditor
TextBox now shrinks to fit the current font based on preferred line height, maintaining its historical minimum size of 40x22
This commit is contained in:
committed by
Andreas Kling
parent
7304556ff2
commit
9c2bcffe83
@@ -22,8 +22,8 @@ namespace GUI {
|
||||
TextBox::TextBox()
|
||||
: TextEditor(TextEditor::SingleLine)
|
||||
{
|
||||
set_min_size({ 40, 22 });
|
||||
set_preferred_size({ SpecialDimension::OpportunisticGrow, 22 });
|
||||
set_min_size({ SpecialDimension::Shrink });
|
||||
set_preferred_size({ SpecialDimension::OpportunisticGrow, SpecialDimension::Shrink });
|
||||
}
|
||||
|
||||
void TextBox::keydown_event(GUI::KeyEvent& event)
|
||||
|
||||
Reference in New Issue
Block a user