Skip to content

Commit

Permalink
MyFrameMain: fix status bar handling for fullscreen and restore
Browse files Browse the repository at this point in the history
Before, the status bar was hidden, but a dedicated area could still be seen.

re #222
  • Loading branch information
bk138 committed Oct 30, 2024
1 parent c3eaa3d commit 1ced105
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/gui/MyFrameMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,9 @@ void MyFrameMain::onFullScreenChanged(wxFullScreenEvent &event) {
splitwinlayout();
// hide toolbar labels
GetToolBar()->SetWindowStyle(GetToolBar()->GetWindowStyle() & ~wxTB_TEXT);
// hide status bar
// hide and unlink status bar
GetStatusBar()->Hide();
SetStatusBar(nullptr);
} else {
// untick menu item
frame_main_menubar->Check(ID_FULLSCREEN, false);
Expand All @@ -671,9 +672,12 @@ void MyFrameMain::onFullScreenChanged(wxFullScreenEvent &event) {
splitwinlayout();
// show toolbar labels
GetToolBar()->SetWindowStyle(GetToolBar()->GetWindowStyle() | wxTB_TEXT);
// show status bar
// reattach and status bar
SetStatusBar(frame_main_statusbar);
GetStatusBar()->Show();
}
// needed at least on MacOS to let the status bar re-appear correctly on restore
SendSizeEvent();
}


Expand Down

0 comments on commit 1ced105

Please sign in to comment.