diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-06 13:39:17 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-06 13:39:17 +0100 |
commit | 5c06c32df4062a17e1caf7aa01ee51e87852070a (patch) | |
tree | 1590bbe4af3624accc6e30575c9ec6a64d692890 /Applications/TextEditor/TextEditorWidget.cpp | |
parent | f8b00aa29010cc3a99b285d0afd88314c40be079 (diff) | |
download | serenity-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/TextEditor/TextEditorWidget.cpp')
-rw-r--r-- | Applications/TextEditor/TextEditorWidget.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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)); |