From 2adce1795211fd0a42c3b4e03ab35a90bb01bccf Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 26 Nov 2023 14:05:29 -0500 Subject: Stop relying on correctly set working directory --- src/eye_indicator.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/eye_indicator.cpp') diff --git a/src/eye_indicator.cpp b/src/eye_indicator.cpp index 03e234e..61ad780 100644 --- a/src/eye_indicator.cpp +++ b/src/eye_indicator.cpp @@ -1,5 +1,7 @@ #include "eye_indicator.h" +#include "global.h" + EyeIndicator::EyeIndicator(wxWindow* parent) : wxWindow(parent, wxID_ANY) { SetMinSize({32, 32}); @@ -17,14 +19,14 @@ void EyeIndicator::SetChecked(bool checked) { } const wxImage& EyeIndicator::GetUncheckedImage() { - static wxImage* unchecked_image = - new wxImage("assets/unchecked.png", wxBITMAP_TYPE_PNG); + static wxImage* unchecked_image = new wxImage( + GetAbsolutePath("assets/unchecked.png").c_str(), wxBITMAP_TYPE_PNG); return *unchecked_image; } const wxImage& EyeIndicator::GetCheckedImage() { - static wxImage* checked_image = - new wxImage("assets/checked.png", wxBITMAP_TYPE_PNG); + static wxImage* checked_image = new wxImage( + GetAbsolutePath("assets/checked.png").c_str(), wxBITMAP_TYPE_PNG); return *checked_image; } -- cgit 1.4.1