X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..91116a35f283956d26d6178656044059089bd6f3:/src/univ/ctrlrend.cpp?ds=sidebyside diff --git a/src/univ/ctrlrend.cpp b/src/univ/ctrlrend.cpp index 60d561ea24..1a55bb9576 100644 --- a/src/univ/ctrlrend.cpp +++ b/src/univ/ctrlrend.cpp @@ -67,8 +67,28 @@ wxControlRenderer::wxControlRenderer(wxWindow *window, m_rect.height = size.y; } -void wxControlRenderer::DrawLabel(const wxBitmap& bitmap, - wxCoord marginX, wxCoord marginY) +void wxControlRenderer::DrawLabel() +{ + m_dc.SetBackgroundMode(wxTRANSPARENT); + m_dc.SetFont(m_window->GetFont()); + m_dc.SetTextForeground(m_window->GetForegroundColour()); + + wxString label = m_window->GetLabel(); + if ( !label.empty() ) + { + wxControl *ctrl = wxStaticCast(m_window, wxControl); + + m_renderer->DrawLabel(m_dc, + label, + m_rect, + m_window->GetStateFlags(), + ctrl->GetAlignment(), + ctrl->GetAccelIndex()); + } +} + +void wxControlRenderer::DrawButtonLabel(const wxBitmap& bitmap, + wxCoord marginX, wxCoord marginY) { m_dc.SetBackgroundMode(wxTRANSPARENT); m_dc.SetFont(m_window->GetFont());