mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 00:29:15 +00:00
LibGUI+Userland: Improve error and font handling for InputBox
Adds fallible factories, ports DeprecatedString, and rebuilds the layout to accomodate system font changes.
This commit is contained in:
parent
9c2bcffe83
commit
02a9e5d3f6
Notes:
sideshowbarker
2024-07-17 02:42:21 +09:00
Author: https://github.com/thankyouverycool
Commit: 02a9e5d3f6
Pull-request: https://github.com/SerenityOS/serenity/pull/18405
19 changed files with 135 additions and 124 deletions
|
@ -242,7 +242,7 @@ ErrorOr<void> MainWidget::create_actions()
|
|||
m_show_system_emoji_action->set_status_tip("Show or hide system emoji");
|
||||
|
||||
m_go_to_glyph_action = GUI::Action::create("&Go to Glyph...", { Mod_Ctrl, Key_G }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/go-to.png"sv)), [&](auto&) {
|
||||
DeprecatedString input;
|
||||
String input;
|
||||
if (GUI::InputBox::show(window(), input, "Hexadecimal:"sv, "Go to glyph"sv, GUI::InputType::NonemptyText) == GUI::InputBox::ExecResult::OK) {
|
||||
auto maybe_code_point = AK::StringUtils::convert_to_uint_from_hex(input);
|
||||
if (!maybe_code_point.has_value())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue