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

Applications: Use modeless windows in some apps

Browser, Spreadsheet and Charactermap now open child windows
modelessly.
This commit is contained in:
thankyouverycool 2022-08-22 15:30:52 -04:00 committed by Andreas Kling
parent 35a230f974
commit d5de9bcc51
3 changed files with 4 additions and 0 deletions

View file

@ -79,6 +79,7 @@ void Tab::view_source(const URL& url, String const& source)
window->resize(640, 480);
window->set_title(url.to_string());
window->set_icon(g_icon_bag.filetype_text);
window->set_window_mode(GUI::WindowMode::Modeless);
window->show();
}
@ -555,6 +556,7 @@ void Tab::show_inspector_window(Browser::Tab::InspectorTarget inspector_target)
{
if (!m_dom_inspector_widget) {
auto window = GUI::Window::construct(&this->window());
window->set_window_mode(GUI::WindowMode::Modeless);
window->resize(300, 500);
window->set_title("Inspector");
window->set_icon(g_icon_bag.inspector_object);

View file

@ -94,6 +94,7 @@ CharacterMapWidget::CharacterMapWidget()
m_find_window->set_icon(GUI::Icon::try_create_default_icon("find"sv).value().bitmap_for_size(16));
m_find_window->set_title("Find a character");
m_find_window->resize(300, 400);
m_find_window->set_window_mode(GUI::WindowMode::Modeless);
}
m_find_window->show();
m_find_window->move_to_front();

View file

@ -53,6 +53,7 @@ SpreadsheetWidget::SpreadsheetWidget(GUI::Window& parent_window, NonnullRefPtrVe
auto docs = sheet_ptr->gather_documentation();
auto help_window = HelpWindow::the(window());
help_window->set_docs(move(docs));
help_window->set_window_mode(GUI::WindowMode::Modeless);
help_window->show();
}
};