Fix wxBitmapButton initial best size determination in wxMSW.
This was broken during wxButton/wxBitmapButton merge and wxBitmapButton was not created with the correct initial size if the default size was specified when creating it any longer. Fix this by calling SetInitialSize() once again after setting the bitmap. See #12323. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -407,6 +407,7 @@ MSW:
|
||||
|
||||
- Fix Cygwin 1.7 build (David Gangola).
|
||||
- Allow using wxDC::DrawText() with multiline texts.
|
||||
- Fix wxBitmapButton best size determination broken in 2.9.1.
|
||||
|
||||
All (GUI):
|
||||
|
||||
|
@@ -136,6 +136,13 @@ bool wxBitmapButton::Create(wxWindow *parent,
|
||||
|
||||
SetBitmapLabel(bitmap);
|
||||
|
||||
if ( !size.IsFullySpecified() )
|
||||
{
|
||||
// As our bitmap has just changed, our best size has changed as well so
|
||||
// reset the initial size using the new value.
|
||||
SetInitialSize(size);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user