diff --git a/src/ui/BalancePanel.cpp b/src/ui/BalancePanel.cpp index 5e0a0f8..e7b4408 100644 --- a/src/ui/BalancePanel.cpp +++ b/src/ui/BalancePanel.cpp @@ -30,7 +30,7 @@ void BalancePanel::Setup() boxSizer->Add(lblBalance, flagsLbl); boxSizer->Add(lblBalanceAmount, flagsLbl); - SetSizer(boxSizer); + SetSizerAndFit(boxSizer); } void BalancePanel::UpdateStuff() diff --git a/src/ui/EventPositionPanel.cpp b/src/ui/EventPositionPanel.cpp index 4edaf92..46edb5e 100644 --- a/src/ui/EventPositionPanel.cpp +++ b/src/ui/EventPositionPanel.cpp @@ -39,5 +39,5 @@ void EventPositionPanel::Setup() gridSizer->Add(lblTotalTraded, flagsLblRight); gridSizer->Add(lblRestingOrders, flagsLblRight); - SetSizer(gridSizer); + SetSizerAndFit(gridSizer); } diff --git a/src/ui/MarketPositionPanel.cpp b/src/ui/MarketPositionPanel.cpp index 7174d13..f4cfb16 100644 --- a/src/ui/MarketPositionPanel.cpp +++ b/src/ui/MarketPositionPanel.cpp @@ -49,5 +49,5 @@ void MarketPositionPanel::Setup() gridSizer->Add(lblTotalTraded, flagsLblRight); gridSizer->Add(lblRestingOrders, flagsLblRight); - SetSizer(gridSizer); + SetSizerAndFit(gridSizer); } diff --git a/src/ui/PortfolioPanel.cpp b/src/ui/PortfolioPanel.cpp index 234b4f2..840777a 100644 --- a/src/ui/PortfolioPanel.cpp +++ b/src/ui/PortfolioPanel.cpp @@ -32,7 +32,7 @@ void PortfolioPanel::Setup() boxSizer->Add(pnlBalance, flagsPnl); boxSizer->Add(pnlPositions, flagsPnl); - SetSizer(boxSizer); + SetSizerAndFit(boxSizer); SetScrollRate(10, 10); } @@ -62,7 +62,7 @@ void PortfolioPanel::UpdateStuff() boxSizer->Add(new MarketPositionPanel(pnlPositions, wxID_ANY, &market), flagsPnl); } - pnlPositions->SetSizer(boxSizer); + pnlPositions->SetSizerAndFit(boxSizer); } catch (std::exception &e) {