patch from Kristjan Jonsson <kj@raunvis.hi.is> to wxCheckBox::DoGetBestSize()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -151,12 +151,12 @@ wxSize wxCheckBox::DoGetBestSize() const
|
|||||||
{
|
{
|
||||||
int wCheckbox, hCheckbox;
|
int wCheckbox, hCheckbox;
|
||||||
|
|
||||||
wxString str = wxGetWindowText(GetHWND()) + " ";
|
wxString str = wxGetWindowText(GetHWND());
|
||||||
|
|
||||||
if ( !str.IsEmpty() )
|
if ( !str.IsEmpty() )
|
||||||
{
|
{
|
||||||
GetTextExtent(str, &wCheckbox, &hCheckbox);
|
GetTextExtent(str, &wCheckbox, &hCheckbox);
|
||||||
wCheckbox += CHECK_SIZE;
|
wCheckbox += CHECK_SIZE + GetCharWidth();
|
||||||
|
|
||||||
if ( hCheckbox < CHECK_SIZE )
|
if ( hCheckbox < CHECK_SIZE )
|
||||||
hCheckbox = CHECK_SIZE;
|
hCheckbox = CHECK_SIZE;
|
||||||
|
Reference in New Issue
Block a user