From 2268234f2dfb6efcfc0904ccab2100abff6f7df4 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 6 Mar 2025 14:17:04 -0500 Subject: Made panes adjustable --- src/tracker_frame.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/tracker_frame.cpp') diff --git a/src/tracker_frame.cpp b/src/tracker_frame.cpp index acc6343..c28a59c 100644 --- a/src/tracker_frame.cpp +++ b/src/tracker_frame.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -106,21 +107,21 @@ TrackerFrame::TrackerFrame() Bind(REDRAW_POSITION, &TrackerFrame::OnRedrawPosition, this); Bind(CONNECT_TO_AP, &TrackerFrame::OnConnectToAp, this); - wxChoicebook *choicebook = new wxChoicebook(this, wxID_ANY); + splitter_window_ = new wxSplitterWindow(this, wxID_ANY); + splitter_window_->SetMinimumPaneSize(250); + + wxChoicebook *choicebook = new wxChoicebook(splitter_window_, wxID_ANY); achievements_pane_ = new AchievementsPane(choicebook); choicebook->AddPage(achievements_pane_, "Achievements"); - notebook_ = new wxNotebook(this, wxID_ANY); + notebook_ = new wxNotebook(splitter_window_, wxID_ANY); tracker_panel_ = new TrackerPanel(notebook_); subway_map_ = new SubwayMap(notebook_); notebook_->AddPage(tracker_panel_, "Map"); notebook_->AddPage(subway_map_, "Subway"); - wxBoxSizer *top_sizer = new wxBoxSizer(wxHORIZONTAL); - top_sizer->Add(choicebook, wxSizerFlags().Expand().Proportion(1)); - top_sizer->Add(notebook_, wxSizerFlags().Expand().Proportion(3)); + splitter_window_->SplitVertically(choicebook, notebook_, 320); - SetSizerAndFit(top_sizer); SetSize(1280, 728); if (!GetTrackerConfig().asked_to_check_for_updates) { -- cgit 1.4.1