]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/renderer.cpp
Added size_t cast to disambiguate array usage.
[wxWidgets.git] / src / univ / renderer.cpp
index 4053fbf68feb622a88ae4564b76cb5af90650d7b..0021d3f2f85ceec40d778795560627cd021e523f 100644 (file)
@@ -38,6 +38,7 @@
 #endif // WX_PRECOMP
 
 #include "wx/image.h"
+#include "wx/log.h"
 
 #include "wx/univ/theme.h"
 #include "wx/univ/renderer.h"
@@ -428,6 +429,10 @@ 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);
@@ -464,7 +469,8 @@ void wxControlRenderer::DrawButtonBorder()
 
     m_renderer->DrawButtonBorder(m_dc, m_rect, flags, &m_rect);
 
-    m_renderer->DrawBackground(m_dc, wxTHEME_BG_COLOUR(m_window), m_rect, flags);
+    // Why do this here?
+    // m_renderer->DrawButtonSurface(m_dc, wxTHEME_BG_COLOUR(m_window), m_rect, flags );
 }
 
 void wxControlRenderer::DrawBitmap(const wxBitmap& bitmap)
@@ -507,7 +513,7 @@ void wxControlRenderer::DrawBitmap(wxDC &dc,
     else if ( stretch & wxEXPAND )
     {
         // stretch bitmap to fill the entire control
-        bmp = wxImage(bmp).Scale(rect.width, rect.height).ConvertToBitmap();
+        bmp = wxBitmap(wxImage(bmp.ConvertToImage()).Scale(rect.width, rect.height));
     }
     else // not stretched, not tiled
     {