X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/415a0ff16d5d50015e3d43c1c6f32f48f995cbab..370dc79c5a7fd9ac24fb001e38388a210750e2e7:/src/univ/checkbox.cpp?ds=sidebyside diff --git a/src/univ/checkbox.cpp b/src/univ/checkbox.cpp index fa84b05a95..7f807740e4 100644 --- a/src/univ/checkbox.cpp +++ b/src/univ/checkbox.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: univ/checkbox.cpp +// Name: src/univ/checkbox.cpp // Purpose: wxCheckBox implementation // Author: Vadim Zeitlin // Modified by: @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "univcheckbox.h" -#endif - #include "wx/wxprec.h" #ifdef __BORLANDC__ @@ -141,8 +137,9 @@ void wxCheckBox::DoDraw(wxControlRenderer *renderer) switch ( Get3StateValue() ) { - case wxCHK_CHECKED: flags |= wxCONTROL_CHECKED; - case wxCHK_UNDETERMINED: flags |= wxCONTROL_UNDETERMINED; + case wxCHK_CHECKED: flags |= wxCONTROL_CHECKED; break; + case wxCHK_UNDETERMINED: flags |= wxCONTROL_UNDETERMINED; break; + default: /* do nothing */ break; } wxBitmap bitmap(GetBitmap(GetState(flags), m_status)); @@ -180,7 +177,9 @@ wxSize wxCheckBox::DoGetBestClientSize() const if ( height < sizeBmp.y ) height = sizeBmp.y; -#if wxUNIV_COMPATIBLE_MSW +#if defined(wxUNIV_COMPATIBLE_MSW) && wxUNIV_COMPATIBLE_MSW + // FIXME: flag nowhere defined so perhaps should be removed? + // this looks better but is different from what wxMSW does height += GetCharHeight()/2; #endif // wxUNIV_COMPATIBLE_MSW @@ -224,6 +223,7 @@ wxCheckBoxState wxCheckBox::DoGet3StateValue() const { case Status_Checked: return wxCHK_CHECKED; case Status_Unchecked: return wxCHK_UNCHECKED; + default: /* go further */ break; } return wxCHK_UNDETERMINED; }