From 7bc33811b9d481a4e62ce6009b889d1c8ec5ebe6 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 23 Sep 2014 17:40:56 +0000 Subject: [PATCH] revised wxRadioButton draw function git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/univ/themes/gtk.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/univ/themes/gtk.cpp b/src/univ/themes/gtk.cpp index fcb09d4260..51f47cde8f 100644 --- a/src/univ/themes/gtk.cpp +++ b/src/univ/themes/gtk.cpp @@ -1010,10 +1010,10 @@ void wxGTKRenderer::DrawRadioButtonBitmap(wxDC& dc, // draw the normal border dc.DrawCircle(xRight/2,yBottom/2,yMid); - wxColor col1, col2; - col1 = wxSCHEME_COLOUR(m_scheme, SHADOW_DARK); - col2 = wxSCHEME_COLOUR(m_scheme, SHADOW_IN); - dc.SetBrush(flags & wxCONTROL_CHECKED ? col1 : col2); + wxColor checkedCol, uncheckedCol; + checkedCol = wxSCHEME_COLOUR(m_scheme, SHADOW_DARK); + uncheckedCol = wxSCHEME_COLOUR(m_scheme, SHADOW_HIGHLIGHT); + dc.SetBrush(flags & wxCONTROL_CHECKED ? checkedCol : uncheckedCol); // inner dot dc.DrawCircle(xRight/2,yBottom/2,yMid/2); @@ -1021,23 +1021,23 @@ void wxGTKRenderer::DrawRadioButtonBitmap(wxDC& dc, bool drawIt = true; if ( flags & wxCONTROL_PRESSED ) - dc.SetBrush(wxColor(128, 138, 135)); + dc.SetBrush(wxSCHEME_COLOUR(m_scheme, CONTROL_PRESSED)); else // unchecked and unpressed drawIt = false; if ( drawIt ) - dc.DrawCircle(xRight/2,yBottom/2,yMid/2); + dc.DrawCircle(xRight/2, yBottom/2, yMid/2); if ( flags & wxCONTROL_PRESSED ) { - dc.SetBrush(wxColor(128, 138, 135)); + dc.SetBrush(wxSCHEME_COLOUR(m_scheme, CONTROL_PRESSED)); drawIt = true; } else // checked and unpressed drawIt = false; if ( drawIt ) - dc.DrawCircle(xRight/2,yBottom/2,yMid/2); + dc.DrawCircle(xRight/2, yBottom/2, yMid/2); } void wxGTKRenderer::DrawUpZag(wxDC& dc,