From 5c06c32df4062a17e1caf7aa01ee51e87852070a Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 6 Feb 2020 13:39:17 +0100 Subject: 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. --- Applications/TextEditor/TextEditorWidget.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Applications/TextEditor/TextEditorWidget.cpp') 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 #include #include -#include #include #include #include @@ -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)); -- cgit v1.2.3