mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 00:15:08 +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 "ManualNode.h"
|
||||
#include "ManualPageNode.h"
|
||||
#include "ManualSectionNode.h"
|
||||
#include <LibGfx/PNGLoader.h>
|
||||
|
||||
static ManualSectionNode s_sections[] = {
|
||||
{ "1", "Command-line programs" },
|
||||
|
@ -44,8 +43,8 @@ static ManualSectionNode s_sections[] = {
|
|||
ManualModel::ManualModel()
|
||||
{
|
||||
// FIXME: need some help from the icon fairy ^)
|
||||
m_section_icon.set_bitmap_for_size(16, Gfx::load_png("/res/icons/16x16/book.png"));
|
||||
m_page_icon.set_bitmap_for_size(16, Gfx::load_png("/res/icons/16x16/filetype-unknown.png"));
|
||||
m_section_icon.set_bitmap_for_size(16, Gfx::Bitmap::load_from_file("/res/icons/16x16/book.png"));
|
||||
m_page_icon.set_bitmap_for_size(16, Gfx::Bitmap::load_from_file("/res/icons/16x16/filetype-unknown.png"));
|
||||
}
|
||||
|
||||
String ManualModel::page_path(const GUI::ModelIndex& index) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue