mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +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
|
@ -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]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue