]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextctrl.cpp
Disable wxUSE_ENH_METAFILE for wxGTK builds.
[wxWidgets.git] / src / richtext / richtextctrl.cpp
index 8ece5a710d7227a312fd338be5b1854447c3dde2..7657356d3527b925f81e7f5e08ea43c465d2f407 100644 (file)
@@ -4863,8 +4863,15 @@ void wxRichTextCaret::Refresh()
 
 void wxRichTextCaret::DoDraw(wxDC *dc)
 {
-    dc->SetBrush((m_hasFocus ? m_caretBrush : *wxTRANSPARENT_BRUSH));
-    dc->SetPen(m_caretPen);
+    wxBrush brush(m_caretBrush);
+    wxPen pen(m_caretPen);
+    if (m_richTextCtrl && m_richTextCtrl->GetBasicStyle().HasTextColour())
+    {
+        brush = wxBrush(m_richTextCtrl->GetBasicStyle().GetTextColour());
+        pen = wxPen(m_richTextCtrl->GetBasicStyle().GetTextColour());
+    }
+    dc->SetBrush((m_hasFocus ? brush : *wxTRANSPARENT_BRUSH));
+    dc->SetPen(pen);
 
     wxPoint pt(m_x, m_y);