/* * Copyright (c) 2021, Nick Vella * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include #include #include #include #include #include namespace GUI { WizardDialog::WizardDialog(Window* parent_window) : Dialog(parent_window) , m_page_stack() { resize(500, 360); set_title(String::formatted("Sample wizard")); set_resizable(false); if (parent_window) set_icon(parent_window->icon()); auto& main_widget = set_main_widget(); main_widget.set_fill_with_background_color(true); main_widget.set_layout(); main_widget.layout()->set_spacing(0); m_page_container_widget = main_widget.add(); m_page_container_widget->set_fixed_size(500, 315); m_page_container_widget->set_layout(); auto& separator = main_widget.add(Gfx::Orientation::Horizontal); separator.set_fixed_height(2); auto& nav_container_widget = main_widget.add(); nav_container_widget.set_layout(); nav_container_widget.set_fixed_height(42); nav_container_widget.layout()->set_margins({ 10, 0, 10, 0 }); nav_container_widget.layout()->set_spacing(0); nav_container_widget.layout()->add_spacer(); m_back_button = nav_container_widget.add