X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8b9c59052ae6479bef2555569fad88ad9de145d4..beab25bde380ccff9bb0ebb8d8743a8d4b13fcdd:/src/univ/themes/win32.cpp?ds=sidebyside diff --git a/src/univ/themes/win32.cpp b/src/univ/themes/win32.cpp index 3261e10239..ead2d25ddd 100644 --- a/src/univ/themes/win32.cpp +++ b/src/univ/themes/win32.cpp @@ -1261,7 +1261,7 @@ wxColour wxWin32ColourScheme::GetBackground(wxWindow *win) const // the colour set by the user should be used for the normal state // and for the states for which we don't have any specific colours - if ( !col.Ok() || (flags != 0) ) + if ( !col.Ok() || (flags & wxCONTROL_PRESSED) != 0 ) { if ( wxDynamicCast(win, wxScrollBar) ) col = Get(flags & wxCONTROL_PRESSED ? SCROLLBAR_PRESSED @@ -1380,7 +1380,7 @@ wxWin32Renderer::wxWin32Renderer(const wxColourScheme *scheme) m_colHighlight = wxSCHEME_COLOUR(scheme, SHADOW_HIGHLIGHT); m_penHighlight = wxPen(m_colHighlight, 0, wxSOLID); - m_titlebarFont = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT); + m_titlebarFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_titlebarFont.SetWeight(wxFONTWEIGHT_BOLD); // init the arrow bitmaps @@ -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, @@ -2254,10 +2260,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 +2283,19 @@ 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)); + DrawCheckOrRadioButton(dc, label, + cbitmap, + rect, flags, align, indexAccel, + 0); // no focus rect offset for checkboxes + } } // ---------------------------------------------------------------------------- @@ -2849,7 +2873,7 @@ wxMenuGeometryInfo *wxWin32Renderer::GetMenuGeometry(wxWindow *win, { // prepare the dc: for now we draw all the items with the system font wxClientDC dc(win); - dc.SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT)); + dc.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); // the height of a normal item wxCoord heightText = dc.GetCharHeight();