// Modified by:
// Created: 15.08.00
// RCS-ID: $Id$
-// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
+// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows license
///////////////////////////////////////////////////////////////////////////////
#include "wx/univ/renderer.h"
#include "wx/univ/colschem.h"
+#if wxUSE_GAUGE
+#include "wx/gauge.h"
+#endif
+
// ============================================================================
// implementation
// ============================================================================
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());
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);
else if ( stretch & wxEXPAND )
{
// stretch bitmap to fill the entire control
- bmp = wxImage(bmp).Scale(rect.width, rect.height).ConvertToBitmap();
+ bmp = wxImage(bmp.ConvertToImage()).Scale(rect.width, rect.height);
}
else // not stretched, not tiled
{
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() )
{