X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/442b35b53bf95f5c6c003ea9ddbefd17adbc2a00..5b3610dab2f75e518fefa8a9ad3076b6366b054a:/src/univ/renderer.cpp?ds=sidebyside diff --git a/src/univ/renderer.cpp b/src/univ/renderer.cpp index 19c027723c..13db530ddb 100644 --- a/src/univ/renderer.cpp +++ b/src/univ/renderer.cpp @@ -417,6 +417,7 @@ wxControlRenderer::wxControlRenderer(wxWindow *window, void wxControlRenderer::DrawLabel(const wxBitmap& bitmap, wxCoord marginX, wxCoord marginY) { + m_dc.SetBackgroundMode(wxTRANSPARENT); m_dc.SetFont(m_window->GetFont()); m_dc.SetTextForeground(m_window->GetForegroundColour()); @@ -427,6 +428,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); @@ -463,7 +468,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) @@ -506,7 +512,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 { @@ -771,7 +777,9 @@ void wxControlRenderer::DrawProgressBar(const wxGauge *gauge) wxRect rect = m_rect; rect.Deflate(1); // FIXME this depends on the border width - m_dc.SetBrush(wxBrush(m_window->GetForegroundColour(), wxSOLID)); + wxColour col = m_window->UseFgCol() ? m_window->GetForegroundColour() + : wxTHEME_COLOUR(GAUGE); + m_dc.SetBrush(wxBrush(col, wxSOLID)); if ( gauge->IsSmooth() ) {