about summary refs log tree commit diff stats
path: root/src/tracker_panel.cpp
diff options
context:
space:
mode:
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();