try loading resources from share, fallback to cwd

This commit is contained in:
ouwou
2021-06-30 18:15:03 -04:00
parent 220aa6d13a
commit 698ec52d5c
12 changed files with 80 additions and 15 deletions

View File

@@ -111,9 +111,9 @@ void ProfileWindow::OnFetchProfile(const UserProfileData &data) {
Glib::RefPtr<Gdk::Pixbuf> pixbuf;
try {
if (name == "verifiedbot")
pixbuf = Gdk::Pixbuf::create_from_file("./res/checkmark.png", 24, 24);
pixbuf = Gdk::Pixbuf::create_from_file(Abaddon::GetResPath("/checkmark.png"), 24, 24);
else
pixbuf = Gdk::Pixbuf::create_from_file("./res/" + name + ".png", 24, 24);
pixbuf = Gdk::Pixbuf::create_from_file(Abaddon::GetResPath("/" + name + ".png"), 24, 24);
} catch (const Glib::Exception &e) {
pixbuf = Abaddon::Get().GetImageManager().GetPlaceholder(24);
}