mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:17:35 +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 "ItemListModel.h"
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibCore/CDirIterator.h>
|
||||
#include <LibGfx/PNGLoader.h>
|
||||
#include <LibGUI/GAction.h>
|
||||
#include <LibGUI/GApplication.h>
|
||||
#include <LibGUI/GBoxLayout.h>
|
||||
|
@ -151,7 +150,7 @@ void DisplayPropertiesWidget::create_frame()
|
|||
m_selected_wallpaper = m_wallpapers.at(index.row());
|
||||
builder.append("/res/wallpapers/");
|
||||
builder.append(m_selected_wallpaper);
|
||||
m_wallpaper_preview->set_icon(Gfx::load_png(builder.to_string()));
|
||||
m_wallpaper_preview->set_icon(Gfx::Bitmap::load_from_file(builder.to_string()));
|
||||
m_wallpaper_preview->set_should_stretch_icon(true);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue