Fix new button appearance in already shown generic wxInfoBar
If the info bar is already shown, newly added buttons have to be relaid out to appear correctly, so just add a call to Layout() in this case. This makes the generic version work as the native GTK one, which already handled this use case correctly. Closes https://github.com/wxWidgets/wxWidgets/pull/1441 Closes #14120.
This commit is contained in:
committed by
Vadim Zeitlin
parent
36ef28c8f3
commit
a8c4cbee09
@@ -275,6 +275,8 @@ void wxInfoBarGeneric::AddButton(wxWindowID btnid, const wxString& label)
|
||||
#endif // __WXMAC__
|
||||
|
||||
sizer->Add(button, wxSizerFlags().Centre().DoubleBorder());
|
||||
if ( IsShown() )
|
||||
sizer->Layout();
|
||||
}
|
||||
|
||||
size_t wxInfoBarGeneric::GetButtonCount() const
|
||||
|
Reference in New Issue
Block a user