From 101f1354451c42ba906e6e5cecde8d5cfc031bf7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 6 May 2020 02:09:34 +0200 Subject: [PATCH] Fix problem with wxTB_VERTICAL | wxTB_RIGHT too This is similar to the previous commit, but for the other direction. --- src/msw/frame.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index 9b957056be..c77d8335e8 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -321,13 +321,12 @@ void wxFrame::PositionStatusBar() if ( toolbar->HasFlag(wxTB_LEFT | wxTB_RIGHT) ) { - if ( toolbar->HasFlag(wxTB_LEFT) ) + if ( !toolbar->HasFlag(wxTB_RIGHT) ) x -= sizeTB.x; w += sizeTB.x; } - else - if ( toolbar->HasFlag(wxTB_BOTTOM) ) + else if ( toolbar->HasFlag(wxTB_BOTTOM) ) { // we need to position the status bar below the toolbar h += sizeTB.y; @@ -943,7 +942,7 @@ wxPoint wxFrame::GetClientAreaOrigin() const { pt.y += sizeTB.y; } - else if ( toolbar->HasFlag(wxTB_LEFT) ) + else if ( toolbar->HasFlag(wxTB_LEFT) && !toolbar->HasFlag(wxTB_RIGHT) ) { pt.x += sizeTB.x; }