LibGUI: Change Label standard preferred height to opportunistic grow

The default size for label is always a compromise, no matter what value
is chosen, some layouts will require local manual overrides.
Having the preferred size be opportunistic_grow in both directions seems
like it's currently the option that works without modification in most
cases.
This commit is contained in:
FrHun
2022-06-29 05:06:56 +02:00
committed by Andreas Kling
parent 104642507a
commit 39c8590720

View File

@@ -23,7 +23,8 @@ Label::Label(String text)
REGISTER_TEXT_ALIGNMENT_PROPERTY("text_alignment", text_alignment, set_text_alignment);
REGISTER_TEXT_WRAPPING_PROPERTY("text_wrapping", text_wrapping, set_text_wrapping);
set_preferred_size({ SpecialDimension::OpportunisticGrow, 22 });
set_preferred_size({ SpecialDimension::OpportunisticGrow });
set_min_height(22);
set_frame_thickness(0);
set_frame_shadow(Gfx::FrameShadow::Plain);