Fix problem with wxTB_VERTICAL | wxTB_RIGHT too

This is similar to the previous commit, but for the other direction.
This commit is contained in:
Vadim Zeitlin
2020-05-06 02:09:34 +02:00
parent 33cda12b74
commit 101f135445

View File

@@ -321,13 +321,12 @@ void wxFrame::PositionStatusBar()
if ( toolbar->HasFlag(wxTB_LEFT | wxTB_RIGHT) ) if ( toolbar->HasFlag(wxTB_LEFT | wxTB_RIGHT) )
{ {
if ( toolbar->HasFlag(wxTB_LEFT) ) if ( !toolbar->HasFlag(wxTB_RIGHT) )
x -= sizeTB.x; x -= sizeTB.x;
w += sizeTB.x; w += sizeTB.x;
} }
else else if ( toolbar->HasFlag(wxTB_BOTTOM) )
if ( toolbar->HasFlag(wxTB_BOTTOM) )
{ {
// we need to position the status bar below the toolbar // we need to position the status bar below the toolbar
h += sizeTB.y; h += sizeTB.y;
@@ -943,7 +942,7 @@ wxPoint wxFrame::GetClientAreaOrigin() const
{ {
pt.y += sizeTB.y; pt.y += sizeTB.y;
} }
else if ( toolbar->HasFlag(wxTB_LEFT) ) else if ( toolbar->HasFlag(wxTB_LEFT) && !toolbar->HasFlag(wxTB_RIGHT) )
{ {
pt.x += sizeTB.x; pt.x += sizeTB.x;
} }