about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2025-03-06 14:57:33 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2025-03-06 14:57:33 -0500
commit336c6a1de8ea9eb2675f82e62f4ffe5c09791af9 (patch)
tree1d3e70718c450e54dfa727346447761a85aa5327 /src
parent9597d8e4c6f29d40049abbfd6cc6688dd2988c89 (diff)
downloadlingo-ap-tracker-336c6a1de8ea9eb2675f82e62f4ffe5c09791af9.tar.gz
lingo-ap-tracker-336c6a1de8ea9eb2675f82e62f4ffe5c09791af9.tar.bz2
lingo-ap-tracker-336c6a1de8ea9eb2675f82e62f4ffe5c09791af9.zip
Handle main window size with DPI better
Diffstat (limited to 'src')
-rw-r--r--src/tracker_frame.cpp8
1 files changed, 5 insertions, 3 deletions
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()
109 Bind(REDRAW_POSITION, &TrackerFrame::OnRedrawPosition, this); 109 Bind(REDRAW_POSITION, &TrackerFrame::OnRedrawPosition, this);
110 Bind(CONNECT_TO_AP, &TrackerFrame::OnConnectToAp, this); 110 Bind(CONNECT_TO_AP, &TrackerFrame::OnConnectToAp, this);
111 111
112 wxSize logicalSize = FromDIP(wxSize(1280, 728));
113
112 splitter_window_ = new wxSplitterWindow(this, wxID_ANY); 114 splitter_window_ = new wxSplitterWindow(this, wxID_ANY);
113 splitter_window_->SetMinimumPaneSize(250); 115 splitter_window_->SetMinimumPaneSize(logicalSize.x / 5);
114 116
115 wxChoicebook *choicebook = new wxChoicebook(splitter_window_, wxID_ANY); 117 wxChoicebook *choicebook = new wxChoicebook(splitter_window_, wxID_ANY);
116 achievements_pane_ = new AchievementsPane(choicebook); 118 achievements_pane_ = new AchievementsPane(choicebook);
@@ -122,9 +124,9 @@ TrackerFrame::TrackerFrame()
122 notebook_->AddPage(tracker_panel_, "Map"); 124 notebook_->AddPage(tracker_panel_, "Map");
123 notebook_->AddPage(subway_map_, "Subway"); 125 notebook_->AddPage(subway_map_, "Subway");
124 126
125 splitter_window_->SplitVertically(choicebook, notebook_, 320); 127 splitter_window_->SplitVertically(choicebook, notebook_, logicalSize.x / 4);
126 128
127 SetSize(1280, 728); 129 SetSize(logicalSize);
128 130
129 if (!GetTrackerConfig().asked_to_check_for_updates) { 131 if (!GetTrackerConfig().asked_to_check_for_updates) {
130 GetTrackerConfig().asked_to_check_for_updates = true; 132 GetTrackerConfig().asked_to_check_for_updates = true;