summaryrefslogtreecommitdiff
path: root/Applications/Browser/main.cpp
diff options
context:
space:
mode:
authorBrendan Coles <bcoles@gmail.com>2020-11-02 19:30:17 +0000
committerAndreas Kling <kling@serenityos.org>2020-11-02 21:06:17 +0100
commit5ed7ca3627717634728cd90ee34168e9b3dd95e2 (patch)
tree87ce2163ceda705bdcd8ef3b6957c863346632e0 /Applications/Browser/main.cpp
parent6861cb8a23ff0bce02edc03fabd098e8a92ecf53 (diff)
downloadserenity-5ed7ca3627717634728cd90ee34168e9b3dd95e2.zip
Applications: Use GUI::Icon::default_icon to set application icon
Diffstat (limited to 'Applications/Browser/main.cpp')
-rw-r--r--Applications/Browser/main.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Applications/Browser/main.cpp b/Applications/Browser/main.cpp
index 764ab49d85..7fe4e5f94d 100644
--- a/Applications/Browser/main.cpp
+++ b/Applications/Browser/main.cpp
@@ -38,6 +38,7 @@
#include <LibGUI/AboutDialog.h>
#include <LibGUI/Application.h>
#include <LibGUI/BoxLayout.h>
+#include <LibGUI/Icon.h>
#include <LibGUI/TabWidget.h>
#include <LibGUI/Window.h>
#include <LibGfx/Bitmap.h>
@@ -123,6 +124,8 @@ int main(int argc, char** argv)
unveil(nullptr, nullptr);
+ auto app_icon = GUI::Icon::default_icon("app-browser");
+
auto m_config = Core::ConfigFile::get_for_app("Browser");
Browser::g_home_url = m_config->read_entry("Preferences", "Home", "about:blank");
@@ -131,7 +134,7 @@ int main(int argc, char** argv)
auto window = GUI::Window::construct();
window->resize(640, 480);
- window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-browser.png"));
+ window->set_icon(app_icon.bitmap_for_size(16));
window->set_title("Browser");
auto& widget = window->set_main_widget<GUI::Widget>();
@@ -221,7 +224,7 @@ int main(int argc, char** argv)
};
window_actions.on_about = [&] {
- GUI::AboutDialog::show("Browser", Gfx::Bitmap::load_from_file("/res/icons/32x32/app-browser.png"), window);
+ GUI::AboutDialog::show("Browser", app_icon.bitmap_for_size(32), window);
};
window_actions.on_show_bookmarks_bar = [&](auto& action) {