about summary refs log tree commit diff stats
path: root/src/eye_indicator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/eye_indicator.cpp')
-rw-r--r--src/eye_indicator.cpp10
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
3EyeIndicator::EyeIndicator(wxWindow* parent) : wxWindow(parent, wxID_ANY) { 5EyeIndicator::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
19const wxImage& EyeIndicator::GetUncheckedImage() { 21const 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
25const wxImage& EyeIndicator::GetCheckedImage() { 27const 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