diff --git a/Userland/Applications/CrashReporter/main.cpp b/Userland/Applications/CrashReporter/main.cpp index ddd72af2e2d..70a103e8616 100644 --- a/Userland/Applications/CrashReporter/main.cpp +++ b/Userland/Applications/CrashReporter/main.cpp @@ -41,19 +41,29 @@ struct TitleAndText { static NonnullRefPtr create_progress_window() { auto window = GUI::Window::construct(); + window->set_title("CrashReporter"); window->set_resizable(false); window->resize(240, 64); window->center_on_screen(); + auto& main_widget = window->set_main_widget(); main_widget.set_fill_with_background_color(true); main_widget.set_layout(); + auto& label = main_widget.add("Generating crash report..."); label.set_fixed_height(30); + auto& progressbar = main_widget.add(); progressbar.set_name("progressbar"); progressbar.set_fixed_width(150); progressbar.set_fixed_height(22); + + window->on_close = [&]() { + if (progressbar.value() != progressbar.max()) + exit(0); + }; + return window; }