about summary refs log tree commit diff stats
path: root/src/subway_map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/subway_map.cpp')
-rw-r--r--src/subway_map.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/subway_map.cpp b/src/subway_map.cpp index c554b16..f742d12 100644 --- a/src/subway_map.cpp +++ b/src/subway_map.cpp
@@ -50,7 +50,7 @@ SubwayMap::SubwayMap(wxWindow *parent) : wxPanel(parent, wxID_ANY) {
50 Bind(wxEVT_LEFT_DOWN, &SubwayMap::OnMouseClick, this); 50 Bind(wxEVT_LEFT_DOWN, &SubwayMap::OnMouseClick, this);
51 Bind(wxEVT_TIMER, &SubwayMap::OnTimer, this); 51 Bind(wxEVT_TIMER, &SubwayMap::OnTimer, this);
52 52
53 zoom_slider_ = new wxSlider(this, wxID_ANY, 0, 0, 8, {15, 15}); 53 zoom_slider_ = new wxSlider(this, wxID_ANY, 0, 0, 8, FromDIP(wxPoint{15, 15}));
54 zoom_slider_->Bind(wxEVT_SLIDER, &SubwayMap::OnZoomSlide, this); 54 zoom_slider_->Bind(wxEVT_SLIDER, &SubwayMap::OnZoomSlide, this);
55 55
56 help_button_ = new wxButton(this, wxID_ANY, "Help"); 56 help_button_ = new wxButton(this, wxID_ANY, "Help");
@@ -252,6 +252,9 @@ void SubwayMap::OnPaint(wxPaintEvent &event) {
252 SetZoomPos({zoom_x_, zoom_y_}); 252 SetZoomPos({zoom_x_, zoom_y_});
253 253
254 SetUpHelpButton(); 254 SetUpHelpButton();
255
256 zoom_slider_->SetSize(FromDIP(15), FromDIP(15), wxDefaultCoord,
257 wxDefaultCoord, wxSIZE_AUTO);
255 } 258 }
256 259
257 wxBufferedPaintDC dc(this); 260 wxBufferedPaintDC dc(this);
@@ -620,6 +623,8 @@ void SubwayMap::Redraw() {
620} 623}
621 624
622void SubwayMap::SetUpHelpButton() { 625void SubwayMap::SetUpHelpButton() {
626 help_button_->SetSize(wxDefaultCoord, wxDefaultCoord, wxDefaultCoord,
627 wxDefaultCoord, wxSIZE_AUTO);
623 help_button_->SetPosition({ 628 help_button_->SetPosition({
624 GetSize().GetWidth() - help_button_->GetSize().GetWidth() - 15, 629 GetSize().GetWidth() - help_button_->GetSize().GetWidth() - 15,
625 15, 630 15,