mirror of
https://github.com/RGBCube/serenity
synced 2025-06-28 21:02:07 +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
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