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

Applications: Use application icons for dialog windows

This commit is contained in:
Brendan Coles 2020-10-31 00:25:30 +00:00 committed by Andreas Kling
parent 15b68b4653
commit e569f7fd1c
5 changed files with 7 additions and 0 deletions

View file

@ -306,6 +306,7 @@ Tab::Tab(Type type)
editor.set_ruler_visible(true); editor.set_ruler_visible(true);
window->resize(640, 480); window->resize(640, 480);
window->set_title(url); window->set_title(url);
window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/filetype-text.png"));
window->show(); window->show();
(void)window.leak_ref(); (void)window.leak_ref();
} else { } else {
@ -321,6 +322,7 @@ Tab::Tab(Type type)
m_dom_inspector_window = GUI::Window::construct(); m_dom_inspector_window = GUI::Window::construct();
m_dom_inspector_window->resize(300, 500); m_dom_inspector_window->resize(300, 500);
m_dom_inspector_window->set_title("DOM inspector"); m_dom_inspector_window->set_title("DOM inspector");
m_dom_inspector_window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/inspector-object.png"));
m_dom_inspector_window->set_main_widget<InspectorWidget>(); m_dom_inspector_window->set_main_widget<InspectorWidget>();
} }
auto* inspector_widget = static_cast<InspectorWidget*>(m_dom_inspector_window->main_widget()); auto* inspector_widget = static_cast<InspectorWidget*>(m_dom_inspector_window->main_widget());
@ -344,6 +346,7 @@ Tab::Tab(Type type)
m_console_window = GUI::Window::construct(); m_console_window = GUI::Window::construct();
m_console_window->resize(500, 300); m_console_window->resize(500, 300);
m_console_window->set_title("JS Console"); m_console_window->set_title("JS Console");
m_console_window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/filetype-javascript.png"));
m_console_window->set_main_widget<ConsoleWidget>(); m_console_window->set_main_widget<ConsoleWidget>();
} }
auto* console_widget = static_cast<ConsoleWidget*>(m_console_window->main_widget()); auto* console_widget = static_cast<ConsoleWidget*>(m_console_window->main_widget());

View file

@ -37,6 +37,7 @@ CreateNewLayerDialog::CreateNewLayerDialog(const Gfx::IntSize& suggested_size, G
: Dialog(parent_window) : Dialog(parent_window)
{ {
set_title("Create new layer"); set_title("Create new layer");
set_icon(parent_window->icon());
resize(200, 200); resize(200, 200);
auto& main_widget = set_main_widget<GUI::Widget>(); auto& main_widget = set_main_widget<GUI::Widget>();

View file

@ -61,6 +61,7 @@ CellTypeDialog::CellTypeDialog(const Vector<Position>& positions, Sheet& sheet,
builder.appendff("Format {} Cells", positions.size()); builder.appendff("Format {} Cells", positions.size());
set_title(builder.string_view()); set_title(builder.string_view());
set_icon(parent->icon());
resize(285, 360); resize(285, 360);
auto& main_widget = set_main_widget<GUI::Widget>(); auto& main_widget = set_main_widget<GUI::Widget>();

View file

@ -81,6 +81,7 @@ HelpWindow::HelpWindow(GUI::Window* parent)
{ {
resize(530, 365); resize(530, 365);
set_title("Spreadsheet Functions Help"); set_title("Spreadsheet Functions Help");
set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-help.png"));
auto& widget = set_main_widget<GUI::Widget>(); auto& widget = set_main_widget<GUI::Widget>();
widget.set_layout<GUI::VerticalBoxLayout>().set_margins({ 4, 4, 4, 4 }); widget.set_layout<GUI::VerticalBoxLayout>().set_margins({ 4, 4, 4, 4 });

View file

@ -34,6 +34,7 @@ PromotionDialog::PromotionDialog(ChessWidget& chess_widget)
, m_selected_piece(Chess::Type::None) , m_selected_piece(Chess::Type::None)
{ {
set_title("Choose piece to promote to"); set_title("Choose piece to promote to");
set_icon(chess_widget.window()->icon());
resize(70 * 4, 70); resize(70 * 4, 70);
auto& main_widget = set_main_widget<GUI::Frame>(); auto& main_widget = set_main_widget<GUI::Frame>();