diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-11-26 14:05:29 -0500 | 
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-11-26 14:05:29 -0500 | 
| commit | 2adce1795211fd0a42c3b4e03ab35a90bb01bccf (patch) | |
| tree | 7fda2f874f0653e4c74edaaf1547fe9802b2005a /src/eye_indicator.cpp | |
| parent | 7fc0e0f50ae961efbe0cac1032b03a42d41d87d5 (diff) | |
| download | lingo-ap-tracker-2adce1795211fd0a42c3b4e03ab35a90bb01bccf.tar.gz lingo-ap-tracker-2adce1795211fd0a42c3b4e03ab35a90bb01bccf.tar.bz2 lingo-ap-tracker-2adce1795211fd0a42c3b4e03ab35a90bb01bccf.zip | |
Stop relying on correctly set working directory
Diffstat (limited to 'src/eye_indicator.cpp')
| -rw-r--r-- | src/eye_indicator.cpp | 10 | 
1 files changed, 6 insertions, 4 deletions
| 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 @@ | |||
| 1 | #include "eye_indicator.h" | 1 | #include "eye_indicator.h" | 
| 2 | 2 | ||
| 3 | #include "global.h" | ||
| 4 | |||
| 3 | EyeIndicator::EyeIndicator(wxWindow* parent) : wxWindow(parent, wxID_ANY) { | 5 | EyeIndicator::EyeIndicator(wxWindow* parent) : wxWindow(parent, wxID_ANY) { | 
| 4 | SetMinSize({32, 32}); | 6 | SetMinSize({32, 32}); | 
| 5 | 7 | ||
| @@ -17,14 +19,14 @@ void EyeIndicator::SetChecked(bool checked) { | |||
| 17 | } | 19 | } | 
| 18 | 20 | ||
| 19 | const wxImage& EyeIndicator::GetUncheckedImage() { | 21 | const wxImage& EyeIndicator::GetUncheckedImage() { | 
| 20 | static wxImage* unchecked_image = | 22 | static wxImage* unchecked_image = new wxImage( | 
| 21 | new wxImage("assets/unchecked.png", wxBITMAP_TYPE_PNG); | 23 | GetAbsolutePath("assets/unchecked.png").c_str(), wxBITMAP_TYPE_PNG); | 
| 22 | return *unchecked_image; | 24 | return *unchecked_image; | 
| 23 | } | 25 | } | 
| 24 | 26 | ||
| 25 | const wxImage& EyeIndicator::GetCheckedImage() { | 27 | const wxImage& EyeIndicator::GetCheckedImage() { | 
| 26 | static wxImage* checked_image = | 28 | static wxImage* checked_image = new wxImage( | 
| 27 | new wxImage("assets/checked.png", wxBITMAP_TYPE_PNG); | 29 | GetAbsolutePath("assets/checked.png").c_str(), wxBITMAP_TYPE_PNG); | 
| 28 | return *checked_image; | 30 | return *checked_image; | 
| 29 | } | 31 | } | 
| 30 | 32 | ||
