summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/Label.h
AgeCommit message (Collapse)Author
2023-04-30LibGUI: Remove Label icons and replace instances with ImageWidgetthankyouverycool
These icons are a relic of GLabel and were never implemented to accomodate both image and text. This convenience can always be added in the future, but no current instance assumes or needs it, so let's replace them all with ImageWidget to show clearer intent.
2023-04-30LibGUI+Userland: Port Labels to Stringthankyouverycool
2023-04-15LibGUI: Resize Label on font changesthankyouverycool
And set fixed preferred heights when autosizing.
2023-04-15LibGUI: Implement calculated_min_size() for Labelthankyouverycool
2023-02-25LibGUI: Use full text width for Label's preferred widthkleines Filmröllchen
A label would prefer to be exactly as wide as its contained text requires. This makes min_width: "fit" work better.
2023-02-21LibGUI: Fix const-correctness issuesAndreas Kling
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-06-28LibGUI: Use new layout system for basic widgetsFrHun
2022-04-04LibGUI: Add optional autosize paddingMatthew Olsson
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-03-12Libraries: Use default constructors/destructors in LibGUILenny Maiorani
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules "The compiler is more likely to get the default semantics right and you cannot implement these functions better than the compiler."
2022-01-29LibGUI: Allow Label icons to be set from GMLDylan Katz
This is similar to dd17df76e9d02b2969b1c4771134a30a4a844e31, which did the same thing for the Button widget.
2021-07-29LibGUI: Do not wrap text in statusbar segmentssin-ack
This commit adds a new property to Label which allows one to enable or disable text wrapping. Statusbar now uses this property to disable text wrapping in its segments, since text wrapping in statusbars doesn't make sense.
2021-07-26Userland: Move text wrapping/elision into the new TextLayout :^)sin-ack
This class now contains all the fun bits about laying out text in a rect. It will handle line wrapping at a certain width, cutting off lines that don't fit the given rect, and handling text elision. Painter::draw_text now internally uses this. Future work here would be not laying out text twice (once actually preparing the lines to be rendered and once to get the bounding box), and possibly adding left elision if necessary. Additionally, this commit makes the Utf32View versions of Painter::draw_text convert to Utf8View internally. The intention is to completely remove those versions, but they're kept at the moment to keep the scope of this PR small.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-03-02LibGUI: Add word wrapping to Labelsthankyouverycool
Adds basic word wrap support to Label widgets. Doesn't yet negotiate autosize or Center/Bottom TextAlignments perfectly.
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling