mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
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.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user