reverted m_adjustMinSize change prepatory for a new approach to fix
the problem git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -207,5 +207,33 @@ void wxStaticText::DoSetSize(int x, int y, int w, int h, int sizeFlags)
|
||||
Refresh();
|
||||
}
|
||||
|
||||
void wxStaticText::SetLabel(const wxString& label)
|
||||
{
|
||||
wxStaticTextBase::SetLabel(label);
|
||||
|
||||
// adjust the size of the window to fit to the label unless autoresizing is
|
||||
// disabled
|
||||
if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
|
||||
{
|
||||
DoSetSize(-1, -1, -1, -1, wxSIZE_AUTO_WIDTH | wxSIZE_AUTO_HEIGHT);
|
||||
SetSizeHints(GetSize());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool wxStaticText::SetFont(const wxFont& font)
|
||||
{
|
||||
bool ret = wxControl::SetFont(font);
|
||||
|
||||
// adjust the size of the window to fit to the label unless autoresizing is
|
||||
// disabled
|
||||
if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
|
||||
{
|
||||
DoSetSize(-1, -1, -1, -1, wxSIZE_AUTO_WIDTH | wxSIZE_AUTO_HEIGHT);
|
||||
SetSizeHints(GetSize());
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif // wxUSE_STATTEXT
|
||||
|
Reference in New Issue
Block a user