X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/11b6a93b1e078fea5bf49ed9e6628a19849c11b3..5f9fd7ea86d211e3681a71c9f70303aa72b5de3c:/src/msw/checkbox.cpp diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp index 3e8f804185..04856bb161 100644 --- a/src/msw/checkbox.cpp +++ b/src/msw/checkbox.cpp @@ -79,9 +79,14 @@ bool wxCheckBox::Create(wxWindow *parent, m_windowStyle = style; + // VZ: disabling this ugliness which completely breaks checkboxes in wxGrid + // whoever did it, please tell me where and how does the checkbox fail + // to appear +#if 0 wxString Label = label; if (Label == wxT("")) Label = wxT(" "); // Apparently needed or checkbox won't show +#endif // 0 if ( id == -1 ) m_windowId = NewControlId(); @@ -111,7 +116,7 @@ bool wxCheckBox::Create(wxWindow *parent, msStyle |= WS_BORDER; */ - m_hWnd = (WXHWND)CreateWindowEx(exStyle, wxT("BUTTON"), Label, + m_hWnd = (WXHWND)CreateWindowEx(exStyle, wxT("BUTTON"), label, msStyle, 0, 0, 0, 0, (HWND)parent->GetHWND(), (HMENU)m_windowId, @@ -140,6 +145,8 @@ void wxCheckBox::SetLabel(const wxString& label) SetWindowText(GetHwnd(), label); } +#define CHECK_SIZE 13 + wxSize wxCheckBox::DoGetBestSize() const { int wCheckbox, hCheckbox; @@ -149,15 +156,15 @@ wxSize wxCheckBox::DoGetBestSize() const if ( !str.IsEmpty() ) { GetTextExtent(str, &wCheckbox, &hCheckbox); - wCheckbox += RADIO_SIZE; + wCheckbox += CHECK_SIZE; - if ( hCheckbox < RADIO_SIZE ) - hCheckbox = RADIO_SIZE; + if ( hCheckbox < CHECK_SIZE ) + hCheckbox = CHECK_SIZE; } else { - wCheckbox = RADIO_SIZE; - hCheckbox = RADIO_SIZE; + wCheckbox = CHECK_SIZE; + hCheckbox = CHECK_SIZE; } return wxSize(wCheckbox, hCheckbox);