From 336c6a1de8ea9eb2675f82e62f4ffe5c09791af9 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 6 Mar 2025 14:57:33 -0500 Subject: Handle main window size with DPI better --- src/tracker_frame.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/tracker_frame.cpp') diff --git a/src/tracker_frame.cpp b/src/tracker_frame.cpp index 5c1ada0..9649c43 100644 --- a/src/tracker_frame.cpp +++ b/src/tracker_frame.cpp @@ -109,8 +109,10 @@ TrackerFrame::TrackerFrame() Bind(REDRAW_POSITION, &TrackerFrame::OnRedrawPosition, this); Bind(CONNECT_TO_AP, &TrackerFrame::OnConnectToAp, this); + wxSize logicalSize = FromDIP(wxSize(1280, 728)); + splitter_window_ = new wxSplitterWindow(this, wxID_ANY); - splitter_window_->SetMinimumPaneSize(250); + splitter_window_->SetMinimumPaneSize(logicalSize.x / 5); wxChoicebook *choicebook = new wxChoicebook(splitter_window_, wxID_ANY); achievements_pane_ = new AchievementsPane(choicebook); @@ -122,9 +124,9 @@ TrackerFrame::TrackerFrame() notebook_->AddPage(tracker_panel_, "Map"); notebook_->AddPage(subway_map_, "Subway"); - splitter_window_->SplitVertically(choicebook, notebook_, 320); + splitter_window_->SplitVertically(choicebook, notebook_, logicalSize.x / 4); - SetSize(1280, 728); + SetSize(logicalSize); if (!GetTrackerConfig().asked_to_check_for_updates) { GetTrackerConfig().asked_to_check_for_updates = true; -- cgit 1.4.1