diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-03-06 14:17:04 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-03-06 14:17:04 -0500 |
commit | 2268234f2dfb6efcfc0904ccab2100abff6f7df4 (patch) | |
tree | cad92881ca999fa176e4e63e945eb03faeb27501 /src | |
parent | 8617b8c8cfad0d16eb244c884cb1fa594811ba59 (diff) | |
download | lingo-ap-tracker-2268234f2dfb6efcfc0904ccab2100abff6f7df4.tar.gz lingo-ap-tracker-2268234f2dfb6efcfc0904ccab2100abff6f7df4.tar.bz2 lingo-ap-tracker-2268234f2dfb6efcfc0904ccab2100abff6f7df4.zip |
Made panes adjustable
Diffstat (limited to 'src')
-rw-r--r-- | src/tracker_frame.cpp | 13 | ||||
-rw-r--r-- | src/tracker_frame.h | 2 |
2 files changed, 9 insertions, 6 deletions
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 @@ | |||
5 | #include <wx/choicebk.h> | 5 | #include <wx/choicebk.h> |
6 | #include <wx/filedlg.h> | 6 | #include <wx/filedlg.h> |
7 | #include <wx/notebook.h> | 7 | #include <wx/notebook.h> |
8 | #include <wx/splitter.h> | ||
8 | #include <wx/stdpaths.h> | 9 | #include <wx/stdpaths.h> |
9 | #include <wx/webrequest.h> | 10 | #include <wx/webrequest.h> |
10 | 11 | ||
@@ -106,21 +107,21 @@ TrackerFrame::TrackerFrame() | |||
106 | Bind(REDRAW_POSITION, &TrackerFrame::OnRedrawPosition, this); | 107 | Bind(REDRAW_POSITION, &TrackerFrame::OnRedrawPosition, this); |
107 | Bind(CONNECT_TO_AP, &TrackerFrame::OnConnectToAp, this); | 108 | Bind(CONNECT_TO_AP, &TrackerFrame::OnConnectToAp, this); |
108 | 109 | ||
109 | wxChoicebook *choicebook = new wxChoicebook(this, wxID_ANY); | 110 | splitter_window_ = new wxSplitterWindow(this, wxID_ANY); |
111 | splitter_window_->SetMinimumPaneSize(250); | ||
112 | |||
113 | wxChoicebook *choicebook = new wxChoicebook(splitter_window_, wxID_ANY); | ||
110 | achievements_pane_ = new AchievementsPane(choicebook); | 114 | achievements_pane_ = new AchievementsPane(choicebook); |
111 | choicebook->AddPage(achievements_pane_, "Achievements"); | 115 | choicebook->AddPage(achievements_pane_, "Achievements"); |
112 | 116 | ||
113 | notebook_ = new wxNotebook(this, wxID_ANY); | 117 | notebook_ = new wxNotebook(splitter_window_, wxID_ANY); |
114 | tracker_panel_ = new TrackerPanel(notebook_); | 118 | tracker_panel_ = new TrackerPanel(notebook_); |
115 | subway_map_ = new SubwayMap(notebook_); | 119 | subway_map_ = new SubwayMap(notebook_); |
116 | notebook_->AddPage(tracker_panel_, "Map"); | 120 | notebook_->AddPage(tracker_panel_, "Map"); |
117 | notebook_->AddPage(subway_map_, "Subway"); | 121 | notebook_->AddPage(subway_map_, "Subway"); |
118 | 122 | ||
119 | wxBoxSizer *top_sizer = new wxBoxSizer(wxHORIZONTAL); | 123 | splitter_window_->SplitVertically(choicebook, notebook_, 320); |
120 | top_sizer->Add(choicebook, wxSizerFlags().Expand().Proportion(1)); | ||
121 | top_sizer->Add(notebook_, wxSizerFlags().Expand().Proportion(3)); | ||
122 | 124 | ||
123 | SetSizerAndFit(top_sizer); | ||
124 | SetSize(1280, 728); | 125 | SetSize(1280, 728); |
125 | 126 | ||
126 | if (!GetTrackerConfig().asked_to_check_for_updates) { | 127 | if (!GetTrackerConfig().asked_to_check_for_updates) { |
diff --git a/src/tracker_frame.h b/src/tracker_frame.h index e9fec17..45331ae 100644 --- a/src/tracker_frame.h +++ b/src/tracker_frame.h | |||
@@ -12,6 +12,7 @@ class SubwayMap; | |||
12 | class TrackerPanel; | 12 | class TrackerPanel; |
13 | class wxBookCtrlEvent; | 13 | class wxBookCtrlEvent; |
14 | class wxNotebook; | 14 | class wxNotebook; |
15 | class wxSplitterWindow; | ||
15 | 16 | ||
16 | class ApConnectEvent : public wxEvent { | 17 | class ApConnectEvent : public wxEvent { |
17 | public: | 18 | public: |
@@ -78,6 +79,7 @@ class TrackerFrame : public wxFrame { | |||
78 | 79 | ||
79 | void CheckForUpdates(bool manual); | 80 | void CheckForUpdates(bool manual); |
80 | 81 | ||
82 | wxSplitterWindow *splitter_window_; | ||
81 | wxNotebook *notebook_; | 83 | wxNotebook *notebook_; |
82 | TrackerPanel *tracker_panel_; | 84 | TrackerPanel *tracker_panel_; |
83 | AchievementsPane *achievements_pane_; | 85 | AchievementsPane *achievements_pane_; |