X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/affe40440e979017b4d48a68178b144a5322d804..a204e0b5da552017a4932b77d0b13b7c9d0bc23b:/src/univ/themes/win32.cpp diff --git a/src/univ/themes/win32.cpp b/src/univ/themes/win32.cpp index 3261e10239..75adfec94e 100644 --- a/src/univ/themes/win32.cpp +++ b/src/univ/themes/win32.cpp @@ -2195,7 +2195,13 @@ wxBitmap wxWin32Renderer::GetIndicator(IndicatorType indType, int flags) : IndicatorStatus_Unchecked; const char **xpm = bmpIndicators[indType][indState][indStatus]; - return xpm ? wxBitmap(xpm) : wxNullBitmap; + if (xpm) + { + wxBitmap bmp(xpm); + return bmp; + } + else + return wxNullBitmap; } void wxWin32Renderer::DrawCheckOrRadioButton(wxDC& dc, @@ -2233,6 +2239,7 @@ void wxWin32Renderer::DrawCheckOrRadioButton(wxDC& dc, rectLabel.SetRight(rect.GetRight()); } + // THIS IS THE CULPRIT -- JACS dc.DrawBitmap(bitmap, xBmp, yBmp, TRUE /* use mask */); DoDrawLabel( @@ -2254,10 +2261,19 @@ void wxWin32Renderer::DrawRadioButton(wxDC& dc, wxAlignment align, int indexAccel) { - DrawCheckOrRadioButton(dc, label, - bitmap.Ok() ? bitmap : GetRadioBitmap(flags), + if (bitmap.Ok()) + DrawCheckOrRadioButton(dc, label, + bitmap, + rect, flags, align, indexAccel, + FOCUS_RECT_OFFSET_Y); // default focus rect offset + else + { + wxBitmap rbitmap(GetRadioBitmap(flags)); + DrawCheckOrRadioButton(dc, label, + rbitmap, rect, flags, align, indexAccel, - FOCUS_RECT_OFFSET_Y); // default focus rect offset + FOCUS_RECT_OFFSET_Y); // default focus rect offset + } } void wxWin32Renderer::DrawCheckButton(wxDC& dc, @@ -2268,10 +2284,21 @@ void wxWin32Renderer::DrawCheckButton(wxDC& dc, wxAlignment align, int indexAccel) { - DrawCheckOrRadioButton(dc, label, - bitmap.Ok() ? bitmap : GetCheckBitmap(flags), - rect, flags, align, indexAccel, - 0); // no focus rect offset for checkboxes + if (bitmap.Ok()) + DrawCheckOrRadioButton(dc, label, + bitmap, + rect, flags, align, indexAccel, + 0); // no focus rect offset for checkboxes + else + { + wxBitmap cbitmap(GetCheckBitmap(flags)); +#if 1 + DrawCheckOrRadioButton(dc, label, + cbitmap, + rect, flags, align, indexAccel, + 0); // no focus rect offset for checkboxes +#endif + } } // ----------------------------------------------------------------------------