1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:18:11 +00:00

Userland: Dynamically update the MonitorSettingsWidget countdown timer

This causes the number of seconds in "Do you want to keep the new
settings? They will be reverted after 10 seconds." to be dynamically
updated.
This commit is contained in:
stijndr 2022-02-18 00:18:34 +01:00 committed by Andreas Kling
parent 413bc9976c
commit d01ca4e3e2
3 changed files with 24 additions and 4 deletions

View file

@ -55,6 +55,12 @@ int MessageBox::ask_about_unsaved_changes(Window* parent_window, StringView path
return box->exec();
}
void MessageBox::set_text(String text)
{
m_text = move(text);
build();
}
MessageBox::MessageBox(Window* parent_window, StringView text, StringView title, Type type, InputType input_type)
: Dialog(parent_window)
, m_text(text)