about summary refs log tree commit diff stats
path: root/src/tracker_panel.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-01-30 16:38:08 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2024-01-30 16:38:08 -0500
commit19959f8479d1bb74f75890dcccbc038871771480 (patch)
tree56aab329819e56a7bcf405f08f2c0fbda9480270 /src/tracker_panel.cpp
parent90a208870cfe150f494e21b351152119f98633a2 (diff)
parent7cb55acb62c5a03df75edd0c3c8f228295c1bee8 (diff)
downloadlingo-ap-tracker-19959f8479d1bb74f75890dcccbc038871771480.tar.gz
lingo-ap-tracker-19959f8479d1bb74f75890dcccbc038871771480.tar.bz2
lingo-ap-tracker-19959f8479d1bb74f75890dcccbc038871771480.zip
Merge branch 'main' into future
Diffstat (limited to 'src/tracker_panel.cpp')
-rw-r--r--src/tracker_panel.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/tracker_panel.cpp b/src/tracker_panel.cpp index 81cb595..3102110 100644 --- a/src/tracker_panel.cpp +++ b/src/tracker_panel.cpp
@@ -35,11 +35,11 @@ TrackerPanel::TrackerPanel(wxWindow *parent) : wxPanel(parent, wxID_ANY) {
35} 35}
36 36
37void TrackerPanel::UpdateIndicators() { 37void TrackerPanel::UpdateIndicators() {
38 Redraw();
39
40 for (AreaIndicator &area : areas_) { 38 for (AreaIndicator &area : areas_) {
41 area.popup->UpdateIndicators(); 39 area.popup->UpdateIndicators();
42 } 40 }
41
42 Redraw();
43} 43}
44 44
45void TrackerPanel::OnPaint(wxPaintEvent &event) { 45void TrackerPanel::OnPaint(wxPaintEvent &event) {
@@ -178,8 +178,10 @@ void TrackerPanel::Redraw() {
178 int popup_y = 178 int popup_y =
179 final_y + map_area.map_y * final_width / image_size.GetWidth(); 179 final_y + map_area.map_y * final_width / image_size.GetWidth();
180 180
181 area.popup->SetMaxSize(panel_size); 181 area.popup->SetClientSize(
182 area.popup->GetSizer()->Fit(area.popup); 182 area.popup->GetVirtualSize().GetWidth(),
183 std::min(panel_size.GetHeight(),
184 area.popup->GetVirtualSize().GetHeight()));
183 185
184 if (popup_x + area.popup->GetSize().GetWidth() > panel_size.GetWidth()) { 186 if (popup_x + area.popup->GetSize().GetWidth() > panel_size.GetWidth()) {
185 popup_x = panel_size.GetWidth() - area.popup->GetSize().GetWidth(); 187 popup_x = panel_size.GetWidth() - area.popup->GetSize().GetWidth();