mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-28 05:52:53 +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
|
@ -121,7 +121,7 @@ RefPtr<GUI::Menu> DebugInfoWidget::get_context_menu_for_variable(const GUI::Mode
|
|||
auto* variable = static_cast<Debug::DebugInfo::VariableInfo const*>(index.internal_data());
|
||||
if (does_variable_support_writing(variable)) {
|
||||
context_menu->add_action(GUI::Action::create("Change value", [&](auto&) {
|
||||
DeprecatedString value;
|
||||
String value;
|
||||
if (GUI::InputBox::show(window(), value, "Enter new value:"sv, "Set variable value"sv) == GUI::InputBox::ExecResult::OK) {
|
||||
auto& model = static_cast<VariablesModel&>(*m_variables_view->model());
|
||||
model.set_variable_value(index, value, window());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue