From 698ec52d5c056f3584c46e67b199adcfba9f8d2e Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Wed, 30 Jun 2021 18:15:03 -0400 Subject: try loading resources from share, fallback to cwd --- components/ratelimitindicator.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'components/ratelimitindicator.cpp') diff --git a/components/ratelimitindicator.cpp b/components/ratelimitindicator.cpp index d962f98..6115900 100644 --- a/components/ratelimitindicator.cpp +++ b/components/ratelimitindicator.cpp @@ -15,9 +15,10 @@ RateLimitIndicator::RateLimitIndicator() add(m_img); m_label.show(); - if (std::filesystem::exists("./res/clock.png")) { + const static auto clock_path = Abaddon::GetResPath("/clock.png"); + if (std::filesystem::exists(clock_path)) { try { - const auto pixbuf = Gdk::Pixbuf::create_from_file("./res/clock.png"); + const auto pixbuf = Gdk::Pixbuf::create_from_file(clock_path); int w, h; GetImageDimensions(pixbuf->get_width(), pixbuf->get_height(), w, h, 20, 10); m_img.property_pixbuf() = pixbuf->scale_simple(w, h, Gdk::INTERP_BILINEAR); -- cgit v1.2.3