]> git.saurik.com Git - wxWidgets.git/commitdiff
minor visual corrections to renderers (patch 649847)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Dec 2002 01:07:35 +0000 (01:07 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Dec 2002 01:07:35 +0000 (01:07 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/univ/renderer.cpp
src/univ/themes/gtk.cpp
src/univ/themes/win32.cpp

index 0021d3f2f85ceec40d778795560627cd021e523f..bc276a675acd8ce3d7b6ed1bd02a3cc46645b041 100644 (file)
@@ -429,10 +429,6 @@ void wxControlRenderer::DrawLabel(const wxBitmap& bitmap,
         if ( bitmap.Ok() )
         {
             rectLabel.Inflate(-marginX, -marginY);
-            
-            // I don't know why this is necessary. RR.
-            rectLabel.x ++;
-            rectLabel.y ++;
         }
 
         wxControl *ctrl = wxStaticCast(m_window, wxControl);
index 5c4f87e74c2edf394039887763f39d7474b8d54e..b3a5c59d4a01454e7260885b9ca6457eb7083ece 100644 (file)
@@ -1610,6 +1610,10 @@ void wxGTKRenderer::DrawRadioButton(wxDC& dc,
         dc.SetBackground(*wxLIGHT_GREY_BRUSH);
         dc.Clear();
         DrawRadioBitmap(dc, rect, flags);
+
+        // must unselect the bitmap before setting a mask for it because of the
+        // MSW limitations
+        dc.SelectObject(wxNullBitmap);
         bitmap.SetMask(new wxMask(bitmap, *wxLIGHT_GREY));
     }
 
index d3afd47d7c874073748f19e53ea37c3728b7d773..085a67263804d81fc11401f7b39ddff1caa63af1 100644 (file)
@@ -1737,8 +1737,7 @@ void wxWin32Renderer::DrawHalfRect(wxDC& dc, wxRect *rect, const wxPen& pen)
                 rect->GetRight(), rect->GetBottom());
 
     // adjust the rect
-    rect->width--;
-    rect->height--;
+    rect->Inflate(-1);
 }
 
 void wxWin32Renderer::DrawShadedRect(wxDC& dc, wxRect *rect,