summaryrefslogtreecommitdiff
path: root/Applications
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-02-06 13:39:17 +0100
committerAndreas Kling <kling@serenityos.org>2020-02-06 13:39:17 +0100
commit5c06c32df4062a17e1caf7aa01ee51e87852070a (patch)
tree1590bbe4af3624accc6e30575c9ec6a64d692890 /Applications
parentf8b00aa29010cc3a99b285d0afd88314c40be079 (diff)
downloadserenity-5c06c32df4062a17e1caf7aa01ee51e87852070a.zip
LibGfx: Prefer using Gfx::Bitmap::load_from_file instead of load_png()
Code that just wants to open a Gfx::Bitmap from a file should not be calling the PNG codec directly.
Diffstat (limited to 'Applications')
-rw-r--r--Applications/Calculator/main.cpp3
-rw-r--r--Applications/ChanViewer/main.cpp5
-rw-r--r--Applications/DisplayProperties/DisplayProperties.cpp3
-rw-r--r--Applications/DisplayProperties/main.cpp5
-rw-r--r--Applications/FileManager/main.cpp5
-rw-r--r--Applications/FontEditor/main.cpp5
-rw-r--r--Applications/Help/ManualModel.cpp5
-rw-r--r--Applications/Help/main.cpp5
-rw-r--r--Applications/HexEditor/HexEditorWidget.cpp3
-rw-r--r--Applications/HexEditor/main.cpp3
-rw-r--r--Applications/IRCClient/IRCAppWindow.cpp5
-rw-r--r--Applications/PaintBrush/ToolboxWidget.cpp3
-rw-r--r--Applications/PaintBrush/main.cpp7
-rw-r--r--Applications/Piano/main.cpp5
-rw-r--r--Applications/QuickShow/main.cpp1
-rw-r--r--Applications/SystemMonitor/main.cpp5
-rw-r--r--Applications/Terminal/main.cpp7
-rw-r--r--Applications/TextEditor/TextEditorWidget.cpp5
-rw-r--r--Applications/TextEditor/main.cpp3
-rw-r--r--Applications/Welcome/main.cpp2
20 files changed, 33 insertions, 52 deletions
diff --git a/Applications/Calculator/main.cpp b/Applications/Calculator/main.cpp
index f12d416a8a..c7f3c6871e 100644
--- a/Applications/Calculator/main.cpp
+++ b/Applications/Calculator/main.cpp
@@ -25,7 +25,6 @@
*/
#include "CalculatorWidget.h"
-#include <LibGfx/PNGLoader.h>
#include <LibGUI/GAboutDialog.h>
#include <LibGUI/GAction.h>
#include <LibGUI/GApplication.h>
@@ -76,7 +75,7 @@ int main(int argc, char** argv)
auto help_menu = GUI::Menu::construct("Help");
help_menu->add_action(GUI::Action::create("About", [&](const GUI::Action&) {
- GUI::AboutDialog::show("Calculator", Gfx::load_png("/res/icons/16x16/app-calculator.png"), window);
+ GUI::AboutDialog::show("Calculator", Gfx::Bitmap::load_from_file("/res/icons/16x16/app-calculator.png"), window);
}));
menubar->add_menu(move(help_menu));
diff --git a/Applications/ChanViewer/main.cpp b/Applications/ChanViewer/main.cpp
index 3013fe1d0f..0a8aee1466 100644
--- a/Applications/ChanViewer/main.cpp
+++ b/Applications/ChanViewer/main.cpp
@@ -26,7 +26,6 @@
#include "BoardListModel.h"
#include "ThreadCatalogModel.h"
-#include <LibGfx/PNGLoader.h>
#include <LibGUI/GAboutDialog.h>
#include <LibGUI/GAction.h>
#include <LibGUI/GApplication.h>
@@ -55,7 +54,7 @@ int main(int argc, char** argv)
auto window = GUI::Window::construct();
window->set_title("ChanViewer");
window->set_rect(100, 100, 800, 500);
- window->set_icon(Gfx::load_png("/res/icons/16x16/app-chanviewer.png"));
+ window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-chanviewer.png"));
auto widget = GUI::Widget::construct();
window->set_main_widget(widget);
@@ -104,7 +103,7 @@ int main(int argc, char** argv)
auto help_menu = GUI::Menu::construct("Help");
help_menu->add_action(GUI::Action::create("About", [&](const GUI::Action&) {
- GUI::AboutDialog::show("ChanViewer", Gfx::load_png("/res/icons/32x32/app-chanviewer.png"), window);
+ GUI::AboutDialog::show("ChanViewer", Gfx::Bitmap::load_from_file("/res/icons/32x32/app-chanviewer.png"), window);
}));
menubar->add_menu(move(help_menu));
diff --git a/Applications/DisplayProperties/DisplayProperties.cpp b/Applications/DisplayProperties/DisplayProperties.cpp
index 0f66590f49..b9d1b9ac3e 100644
--- a/Applications/DisplayProperties/DisplayProperties.cpp
+++ b/Applications/DisplayProperties/DisplayProperties.cpp
@@ -28,7 +28,6 @@
#include "ItemListModel.h"
#include <AK/StringBuilder.h>
#include <LibCore/CDirIterator.h>
-#include <LibGfx/PNGLoader.h>
#include <LibGUI/GAction.h>
#include <LibGUI/GApplication.h>
#include <LibGUI/GBoxLayout.h>
@@ -151,7 +150,7 @@ void DisplayPropertiesWidget::create_frame()
m_selected_wallpaper = m_wallpapers.at(index.row());
builder.append("/res/wallpapers/");
builder.append(m_selected_wallpaper);
- m_wallpaper_preview->set_icon(Gfx::load_png(builder.to_string()));
+ m_wallpaper_preview->set_icon(Gfx::Bitmap::load_from_file(builder.to_string()));
m_wallpaper_preview->set_should_stretch_icon(true);
};
diff --git a/Applications/DisplayProperties/main.cpp b/Applications/DisplayProperties/main.cpp
index cb765bbbd2..b3a05a2d74 100644
--- a/Applications/DisplayProperties/main.cpp
+++ b/Applications/DisplayProperties/main.cpp
@@ -25,7 +25,6 @@
*/
#include "DisplayProperties.h"
-#include <LibGfx/PNGLoader.h>
#include <LibGUI/GAboutDialog.h>
#include <LibGUI/GAction.h>
#include <LibGUI/GApplication.h>
@@ -58,7 +57,7 @@ int main(int argc, char** argv)
window->resize(400, 448);
window->set_resizable(false);
window->set_main_widget(instance.root_widget());
- window->set_icon(Gfx::load_png("/res/icons/16x16/app-display-properties.png"));
+ window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-display-properties.png"));
// Let's create the menubar first
auto menubar = make<GUI::MenuBar>();
@@ -71,7 +70,7 @@ int main(int argc, char** argv)
auto help_menu = GUI::Menu::construct("Help");
help_menu->add_action(GUI::Action::create("About", [&](const GUI::Action&) {
- GUI::AboutDialog::show("Display Properties", Gfx::load_png("/res/icons/32x32/app-display-properties.png"), window);
+ GUI::AboutDialog::show("Display Properties", Gfx::Bitmap::load_from_file("/res/icons/32x32/app-display-properties.png"), window);
}));
menubar->add_menu(move(help_menu));
diff --git a/Applications/FileManager/main.cpp b/Applications/FileManager/main.cpp
index 15758bf6a2..a0c604d3d0 100644
--- a/Applications/FileManager/main.cpp
+++ b/Applications/FileManager/main.cpp
@@ -31,7 +31,6 @@
#include <AK/StringBuilder.h>
#include <LibCore/CConfigFile.h>
#include <LibCore/CUserInfo.h>
-#include <LibGfx/PNGLoader.h>
#include <LibGUI/GAboutDialog.h>
#include <LibGUI/GAction.h>
#include <LibGUI/GActionGroup.h>
@@ -445,7 +444,7 @@ int main(int argc, char** argv)
auto help_menu = GUI::Menu::construct("Help");
help_menu->add_action(GUI::Action::create("About", [&](const GUI::Action&) {
- GUI::AboutDialog::show("File Manager", Gfx::load_png("/res/icons/32x32/filetype-folder.png"), window);
+ GUI::AboutDialog::show("File Manager", Gfx::Bitmap::load_from_file("/res/icons/32x32/filetype-folder.png"), window);
}));
menubar->add_menu(move(help_menu));
@@ -587,7 +586,7 @@ int main(int argc, char** argv)
window->set_main_widget(widget);
window->show();
- window->set_icon(Gfx::load_png("/res/icons/16x16/filetype-folder.png"));
+ window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/filetype-folder.png"));
// Read direcory read mode from config.
auto dir_view_mode = config->read_entry("DirectoryView", "ViewMode", "Icon");
diff --git a/Applications/FontEditor/main.cpp b/Applications/FontEditor/main.cpp
index 91bbfd2330..1113d5d8f8 100644
--- a/Applications/FontEditor/main.cpp
+++ b/Applications/FontEditor/main.cpp
@@ -25,7 +25,6 @@
*/
#include "FontEditor.h"
-#include <LibGfx/PNGLoader.h>
#include <LibGUI/GAboutDialog.h>
#include <LibGUI/GAction.h>
#include <LibGUI/GApplication.h>
@@ -71,7 +70,7 @@ int main(int argc, char** argv)
auto font_editor = FontEditorWidget::construct(path, move(edited_font));
window->set_main_widget(font_editor);
window->show();
- window->set_icon(Gfx::load_png("/res/icons/16x16/app-font-editor.png"));
+ window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-font-editor.png"));
auto menubar = make<GUI::MenuBar>();
@@ -84,7 +83,7 @@ int main(int argc, char** argv)
auto help_menu = GUI::Menu::construct("Help");
help_menu->add_action(GUI::Action::create("About", [&](const GUI::Action&) {
- GUI::AboutDialog::show("Font Editor", Gfx::load_png("/res/icons/FontEditor.png"), window);
+ GUI::AboutDialog::show("Font Editor", Gfx::Bitmap::load_from_file("/res/icons/FontEditor.png"), window);
}));
menubar->add_menu(move(help_menu));
diff --git a/Applications/Help/ManualModel.cpp b/Applications/Help/ManualModel.cpp
index 3ed77de1a7..928863de56 100644
--- a/Applications/Help/ManualModel.cpp
+++ b/Applications/Help/ManualModel.cpp
@@ -28,7 +28,6 @@
#include "ManualNode.h"
#include "ManualPageNode.h"
#include "ManualSectionNode.h"
-#include <LibGfx/PNGLoader.h>
static ManualSectionNode s_sections[] = {
{ "1", "Command-line programs" },
@@ -44,8 +43,8 @@ static ManualSectionNode s_sections[] = {
ManualModel::ManualModel()
{
// FIXME: need some help from the icon fairy ^)
- m_section_icon.set_bitmap_for_size(16, Gfx::load_png("/res/icons/16x16/book.png"));
- m_page_icon.set_bitmap_for_size(16, Gfx::load_png("/res/icons/16x16/filetype-unknown.png"));
+ m_section_icon.set_bitmap_for_size(16, Gfx::Bitmap::load_from_file("/res/icons/16x16/book.png"));
+ m_page_icon.set_bitmap_for_size(16, Gfx::Bitmap::load_from_file("/res/icons/16x16/filetype-unknown.png"));
}
String ManualModel::page_path(const GUI::ModelIndex& index) const
diff --git a/Applications/Help/main.cpp b/Applications/Help/main.cpp
index b1663a147a..9857db9419 100644
--- a/Applications/Help/main.cpp
+++ b/Applications/Help/main.cpp
@@ -27,7 +27,6 @@
#include "History.h"
#include "ManualModel.h"
#include <LibCore/CFile.h>
-#include <LibGfx/PNGLoader.h>
#include <LibGUI/GAboutDialog.h>
#include <LibGUI/GAction.h>
#include <LibGUI/GApplication.h>
@@ -180,7 +179,7 @@ int main(int argc, char* argv[])
auto app_menu = GUI::Menu::construct("Help");
app_menu->add_action(GUI::Action::create("About", [&](const GUI::Action&) {
- GUI::AboutDialog::show("Help", Gfx::load_png("/res/icons/16x16/book.png"), window);
+ GUI::AboutDialog::show("Help", Gfx::Bitmap::load_from_file("/res/icons/16x16/book.png"), window);
}));
app_menu->add_separator();
app_menu->add_action(GUI::CommonActions::make_quit_action([](auto&) {
@@ -199,7 +198,7 @@ int main(int argc, char* argv[])
window->set_focused_widget(tree_view);
window->show();
- window->set_icon(Gfx::load_png("/res/icons/16x16/book.png"));
+ window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/book.png"));
return app.exec();
}
diff --git a/Applications/HexEditor/HexEditorWidget.cpp b/Applications/HexEditor/HexEditorWidget.cpp
index 538ad6bd40..781a0a2ed8 100644
--- a/Applications/HexEditor/HexEditorWidget.cpp
+++ b/Applications/HexEditor/HexEditorWidget.cpp
@@ -28,7 +28,6 @@
#include <AK/Optional.h>
#include <AK/StringBuilder.h>
#include <LibCore/CFile.h>
-#include <LibGfx/PNGLoader.h>
#include <LibGUI/GAboutDialog.h>
#include <LibGUI/GAction.h>
#include <LibGUI/GBoxLayout.h>
@@ -202,7 +201,7 @@ HexEditorWidget::HexEditorWidget()
auto help_menu = GUI::Menu::construct("Help");
help_menu->add_action(GUI::Action::create("About", [&](const GUI::Action&) {
- GUI::AboutDialog::show("Hex Editor", Gfx::load_png("/res/icons/32x32/app-hexeditor.png"), window());
+ GUI::AboutDialog::show("Hex Editor", Gfx::Bitmap::load_from_file("/res/icons/32x32/app-hexeditor.png"), window());
}));
menubar->add_menu(move(help_menu));
diff --git a/Applications/HexEditor/main.cpp b/Applications/HexEditor/main.cpp
index f5d1d59794..d1fb95b6ba 100644
--- a/Applications/HexEditor/main.cpp
+++ b/Applications/HexEditor/main.cpp
@@ -25,7 +25,6 @@
*/
#include "HexEditorWidget.h"
-#include <LibGfx/PNGLoader.h>
#include <stdio.h>
int main(int argc, char** argv)
@@ -56,7 +55,7 @@ int main(int argc, char** argv)
};
window->show();
- window->set_icon(Gfx::load_png("/res/icons/16x16/app-hexeditor.png"));
+ window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-hexeditor.png"));
if (argc >= 2)
hex_editor_widget->open_file(argv[1]);
diff --git a/Applications/IRCClient/IRCAppWindow.cpp b/Applications/IRCClient/IRCAppWindow.cpp
index 46ea2cdc70..3578e922c8 100644
--- a/Applications/IRCClient/IRCAppWindow.cpp
+++ b/Applications/IRCClient/IRCAppWindow.cpp
@@ -28,7 +28,6 @@
#include "IRCChannel.h"
#include "IRCWindow.h"
#include "IRCWindowListModel.h"
-#include <LibGfx/PNGLoader.h>
#include <LibGUI/GAboutDialog.h>
#include <LibGUI/GAction.h>
#include <LibGUI/GApplication.h>
@@ -55,7 +54,7 @@ IRCAppWindow::IRCAppWindow()
ASSERT(!s_the);
s_the = this;
- set_icon(Gfx::load_png("/res/icons/16x16/app-irc-client.png"));
+ set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-irc-client.png"));
update_title();
set_rect(200, 200, 600, 400);
@@ -170,7 +169,7 @@ void IRCAppWindow::setup_menus()
auto help_menu = GUI::Menu::construct("Help");
help_menu->add_action(GUI::Action::create("About", [this](const GUI::Action&) {
- GUI::AboutDialog::show("IRC Client", Gfx::load_png("/res/icons/32x32/app-irc-client.png"), this);
+ GUI::AboutDialog::show("IRC Client", Gfx::Bitmap::load_from_file("/res/icons/32x32/app-irc-client.png"), this);
}));
menubar->add_menu(move(help_menu));
diff --git a/Applications/PaintBrush/ToolboxWidget.cpp b/Applications/PaintBrush/ToolboxWidget.cpp
index 358781e6a0..ddfb51a669 100644
--- a/Applications/PaintBrush/ToolboxWidget.cpp
+++ b/Applications/PaintBrush/ToolboxWidget.cpp
@@ -34,7 +34,6 @@
#include "PickerTool.h"
#include "RectangleTool.h"
#include "SprayTool.h"
-#include <LibGfx/PNGLoader.h>
#include <LibGUI/GBoxLayout.h>
#include <LibGUI/GButton.h>
@@ -83,7 +82,7 @@ ToolboxWidget::ToolboxWidget(GUI::Widget* parent)
button->set_checkable(true);
button->set_exclusive(true);
- button->set_icon(Gfx::load_png(String::format("/res/icons/paintbrush/%s.png", String(icon_name).characters())));
+ button->set_icon(Gfx::Bitmap::load_from_file(String::format("/res/icons/paintbrush/%s.png", String(icon_name).characters())));
button->on_checked = [button = button.ptr()](auto checked) {
if (checked)
diff --git a/Applications/PaintBrush/main.cpp b/Applications/PaintBrush/main.cpp
index 996d8ae353..3ff887fec6 100644
--- a/Applications/PaintBrush/main.cpp
+++ b/Applications/PaintBrush/main.cpp
@@ -27,7 +27,6 @@
#include "PaintableWidget.h"
#include "PaletteWidget.h"
#include "ToolboxWidget.h"
-#include <LibGfx/PNGLoader.h>
#include <LibGUI/GAboutDialog.h>
#include <LibGUI/GAction.h>
#include <LibGUI/GApplication.h>
@@ -56,7 +55,7 @@ int main(int argc, char** argv)
auto window = GUI::Window::construct();
window->set_title("PaintBrush");
window->set_rect(100, 100, 640, 480);
- window->set_icon(Gfx::load_png("/res/icons/16x16/app-paintbrush.png"));
+ window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-paintbrush.png"));
auto horizontal_container = GUI::Widget::construct();
window->set_main_widget(horizontal_container);
@@ -84,7 +83,7 @@ int main(int argc, char** argv)
if (!open_path.has_value())
return;
- auto bitmap = Gfx::load_png(open_path.value());
+ auto bitmap = Gfx::Bitmap::load_from_file(open_path.value());
if (!bitmap) {
GUI::MessageBox::show(String::format("Failed to load '%s'", open_path.value().characters()), "Open failed", GUI::MessageBox::Type::Error, GUI::MessageBox::InputType::OK, window);
return;
@@ -104,7 +103,7 @@ int main(int argc, char** argv)
auto help_menu = GUI::Menu::construct("Help");
help_menu->add_action(GUI::Action::create("About", [&](auto&) {
- GUI::AboutDialog::show("PaintBrush", Gfx::load_png("/res/icons/32x32/app-paintbrush.png"), window);
+ GUI::AboutDialog::show("PaintBrush", Gfx::Bitmap::load_from_file("/res/icons/32x32/app-paintbrush.png"), window);
}));
menubar->add_menu(move(help_menu));
diff --git a/Applications/Piano/main.cpp b/Applications/Piano/main.cpp
index a01e1141f5..01f7801e9f 100644
--- a/Applications/Piano/main.cpp
+++ b/Applications/Piano/main.cpp
@@ -29,7 +29,6 @@
#include "MainWidget.h"
#include <LibAudio/AClientConnection.h>
#include <LibCore/CFile.h>
-#include <LibGfx/PNGLoader.h>
#include <LibGUI/GAboutDialog.h>
#include <LibGUI/GAction.h>
#include <LibGUI/GApplication.h>
@@ -51,7 +50,7 @@ int main(int argc, char** argv)
window->set_main_widget(main_widget);
window->set_title("Piano");
window->set_rect(90, 90, 840, 600);
- window->set_icon(Gfx::load_png("/res/icons/16x16/app-piano.png"));
+ window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-piano.png"));
window->show();
LibThread::Thread audio_thread([&] {
@@ -82,7 +81,7 @@ int main(int argc, char** argv)
auto help_menu = GUI::Menu::construct("Help");
help_menu->add_action(GUI::Action::create("About", [&](const GUI::Action&) {
- GUI::AboutDialog::show("Piano", Gfx::load_png("/res/icons/32x32/app-piano.png"), window);
+ GUI::AboutDialog::show("Piano", Gfx::Bitmap::load_from_file("/res/icons/32x32/app-piano.png"), window);
}));
menubar->add_menu(move(help_menu));
diff --git a/Applications/QuickShow/main.cpp b/Applications/QuickShow/main.cpp
index 3d472a3e69..6e9b290f05 100644
--- a/Applications/QuickShow/main.cpp
+++ b/Applications/QuickShow/main.cpp
@@ -25,7 +25,6 @@
*/
#include "QSWidget.h"
-#include <LibGfx/PNGLoader.h>
#include <LibGUI/GAction.h>
#include <LibGUI/GApplication.h>
#include <LibGUI/GBoxLayout.h>
diff --git a/Applications/SystemMonitor/main.cpp b/Applications/SystemMonitor/main.cpp
index ddd4a62670..5cb23ca6ed 100644
--- a/Applications/SystemMonitor/main.cpp
+++ b/Applications/SystemMonitor/main.cpp
@@ -35,7 +35,6 @@
#include "ProcessTableView.h"
#include "ProcessUnveiledPathsWidget.h"
#include <LibCore/CTimer.h>
-#include <LibGfx/PNGLoader.h>
#include <LibGUI/GAboutDialog.h>
#include <LibGUI/GAction.h>
#include <LibGUI/GActionGroup.h>
@@ -222,7 +221,7 @@ int main(int argc, char** argv)
auto help_menu = GUI::Menu::construct("Help");
help_menu->add_action(GUI::Action::create("About", [&](const GUI::Action&) {
- GUI::AboutDialog::show("System Monitor", Gfx::load_png("/res/icons/32x32/app-system-monitor.png"), window);
+ GUI::AboutDialog::show("System Monitor", Gfx::Bitmap::load_from_file("/res/icons/32x32/app-system-monitor.png"), window);
}));
menubar->add_menu(move(help_menu));
@@ -251,7 +250,7 @@ int main(int argc, char** argv)
window->show();
- window->set_icon(Gfx::load_png("/res/icons/16x16/app-system-monitor.png"));
+ window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-system-monitor.png"));
return app.exec();
}
diff --git a/Applications/Terminal/main.cpp b/Applications/Terminal/main.cpp
index 8f9efd317e..0ac4a8edaf 100644
--- a/Applications/Terminal/main.cpp
+++ b/Applications/Terminal/main.cpp
@@ -27,7 +27,6 @@
#include <Kernel/KeyCode.h>
#include <LibCore/CArgsParser.h>
#include <LibCore/CUserInfo.h>
-#include <LibGfx/PNGLoader.h>
#include <LibGUI/GAboutDialog.h>
#include <LibGUI/GAction.h>
#include <LibGUI/GActionGroup.h>
@@ -235,7 +234,7 @@ int main(int argc, char** argv)
window->move_to(300, 300);
terminal->apply_size_increments_to_window(*window);
window->show();
- window->set_icon(Gfx::load_png("/res/icons/16x16/app-terminal.png"));
+ window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-terminal.png"));
terminal->set_should_beep(config->read_bool_entry("Window", "AudibleBeep", false));
RefPtr<GUI::Window> settings_window;
@@ -253,7 +252,7 @@ int main(int argc, char** argv)
exit(1);
}
}));
- app_menu->add_action(GUI::Action::create("Settings...", Gfx::load_png("/res/icons/gear16.png"),
+ app_menu->add_action(GUI::Action::create("Settings...", Gfx::Bitmap::load_from_file("/res/icons/gear16.png"),
[&](const GUI::Action&) {
if (!settings_window) {
settings_window = create_settings_window(*terminal);
@@ -300,7 +299,7 @@ int main(int argc, char** argv)
auto help_menu = GUI::Menu::construct("Help");
help_menu->add_action(GUI::Action::create("About", [&](const GUI::Action&) {
- GUI::AboutDialog::show("Terminal", Gfx::load_png("/res/icons/32x32/app-terminal.png"), window);
+ GUI::AboutDialog::show("Terminal", Gfx::Bitmap::load_from_file("/res/icons/32x32/app-terminal.png"), window);
}));
menubar->add_menu(move(help_menu));
diff --git a/Applications/TextEditor/TextEditorWidget.cpp b/Applications/TextEditor/TextEditorWidget.cpp
index a90ae23083..1ccc84c792 100644
--- a/Applications/TextEditor/TextEditorWidget.cpp
+++ b/Applications/TextEditor/TextEditorWidget.cpp
@@ -29,7 +29,6 @@
#include <AK/StringBuilder.h>
#include <AK/URL.h>
#include <LibCore/CFile.h>
-#include <LibGfx/PNGLoader.h>
#include <LibGUI/GAboutDialog.h>
#include <LibGUI/GAction.h>
#include <LibGUI/GBoxLayout.h>
@@ -243,7 +242,7 @@ TextEditorWidget::TextEditorWidget()
m_editor->set_focus(true);
};
- m_find_replace_action = GUI::Action::create("Find/Replace...", { Mod_Ctrl, Key_F }, Gfx::load_png("/res/icons/16x16/find.png"), [this](auto&) {
+ m_find_replace_action = GUI::Action::create("Find/Replace...", { Mod_Ctrl, Key_F }, Gfx::Bitmap::load_from_file("/res/icons/16x16/find.png"), [this](auto&) {
m_find_replace_widget->set_visible(true);
m_find_widget->set_visible(true);
m_replace_widget->set_visible(true);
@@ -384,7 +383,7 @@ TextEditorWidget::TextEditorWidget()
auto help_menu = GUI::Menu::construct("Help");
help_menu->add_action(GUI::Action::create("About", [&](const GUI::Action&) {
- GUI::AboutDialog::show("Text Editor", Gfx::load_png("/res/icons/32x32/app-texteditor.png"), window());
+ GUI::AboutDialog::show("Text Editor", Gfx::Bitmap::load_from_file("/res/icons/32x32/app-texteditor.png"), window());
}));
menubar->add_menu(move(help_menu));
diff --git a/Applications/TextEditor/main.cpp b/Applications/TextEditor/main.cpp
index 8eb1f65867..dd94f70d43 100644
--- a/Applications/TextEditor/main.cpp
+++ b/Applications/TextEditor/main.cpp
@@ -25,7 +25,6 @@
*/
#include "TextEditorWidget.h"
-#include <LibGfx/PNGLoader.h>
#include <stdio.h>
int main(int argc, char** argv)
@@ -61,7 +60,7 @@ int main(int argc, char** argv)
text_widget->open_sesame(argv[1]);
window->show();
- window->set_icon(Gfx::load_png("/res/icons/TextEditor16.png"));
+ window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/TextEditor16.png"));
return app.exec();
}
diff --git a/Applications/Welcome/main.cpp b/Applications/Welcome/main.cpp
index 3ce100c035..1444e42208 100644
--- a/Applications/Welcome/main.cpp
+++ b/Applications/Welcome/main.cpp
@@ -26,7 +26,6 @@
#include <AK/String.h>
#include <AK/Vector.h>
-#include <LibGfx/PNGLoader.h>
#include <LibGUI/GApplication.h>
#include <LibGUI/GBoxLayout.h>
#include <LibGUI/GButton.h>
@@ -34,6 +33,7 @@
#include <LibGUI/GLabel.h>
#include <LibGUI/GStackWidget.h>
#include <LibGUI/GWindow.h>
+#include <LibGfx/PNGLoader.h>
#include "TextWidget.h"