mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:27:45 +00:00
Ladybird: Load all icons uses Core::Resource URIs
This commit is contained in:
parent
aa9387c76c
commit
1b30b510b9
7 changed files with 97 additions and 58 deletions
|
@ -8,6 +8,7 @@
|
|||
#include <AK/String.h>
|
||||
#include <AK/URL.h>
|
||||
#include <Ladybird/Utilities.h>
|
||||
#include <LibCore/Resource.h>
|
||||
#include <LibGfx/ImageFormats/PNGWriter.h>
|
||||
#include <LibGfx/ShareableBitmap.h>
|
||||
|
||||
|
@ -50,8 +51,8 @@ static constexpr CGFloat const WINDOW_HEIGHT = 800;
|
|||
static dispatch_once_t token;
|
||||
|
||||
dispatch_once(&token, ^{
|
||||
auto default_favicon_path = MUST(String::formatted("{}/res/icons/16x16/app-browser.png", s_serenity_resource_root));
|
||||
auto* ns_default_favicon_path = Ladybird::string_to_ns_string(default_favicon_path);
|
||||
auto default_favicon_path = MUST(Core::Resource::load_from_uri("resource://icons/16x16/app-browser.png"sv));
|
||||
auto* ns_default_favicon_path = Ladybird::string_to_ns_string(default_favicon_path->filesystem_path());
|
||||
|
||||
default_favicon = [[NSImage alloc] initWithContentsOfFile:ns_default_favicon_path];
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue