mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:28:10 +00:00
LibGUI: Store text using the new String class in the AbstractButton
This change also adds non-deprecated text() and set_text() functions and helper constructors for Button, CheckBox, and RadioButton to call the strings directly. The whole codebase at this point is still using the deprecated string functions, which the class will quietly convert to a new String.
This commit is contained in:
parent
d32b052f22
commit
fca29eae09
8 changed files with 42 additions and 12 deletions
|
@ -20,7 +20,12 @@ REGISTER_WIDGET(GUI, DialogButton)
|
|||
|
||||
namespace GUI {
|
||||
|
||||
Button::Button(DeprecatedString text)
|
||||
Button::Button(DeprecatedString deprecated_text)
|
||||
: Button(String::from_deprecated_string(deprecated_text).release_value_but_fixme_should_propagate_errors())
|
||||
{
|
||||
}
|
||||
|
||||
Button::Button(String text)
|
||||
: AbstractButton(move(text))
|
||||
{
|
||||
set_min_size({ 40, 22 });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue