mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +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:
parent
f8b00aa290
commit
5c06c32df4
31 changed files with 48 additions and 77 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue