From 768f35ecc6d094d35fc39887469e13547eba715b Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 25 Oct 2007 14:53:25 +0000 Subject: [PATCH] Now uses the correct selection colours. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextbuffer.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index 17686aae19..20859e98ad 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -28,6 +28,7 @@ #include "wx/module.h" #endif +#include "wx/settings.h" #include "wx/filename.h" #include "wx/clipbrd.h" #include "wx/wfstream.h" @@ -4327,9 +4328,12 @@ bool wxRichTextPlainText::DrawTabbedString(wxDC& dc, const wxTextAttrEx& attr, c if (selected) { - dc.SetBrush(*wxBLACK_BRUSH); - dc.SetPen(*wxBLACK_PEN); - dc.SetTextForeground(*wxWHITE); + wxColour highlightColour(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT)); + wxColour highlightTextColour(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT)); + + dc.SetBrush(wxBrush(highlightColour)); + dc.SetPen(wxPen(highlightColour)); + dc.SetTextForeground(highlightTextColour); dc.SetBackgroundMode(wxTRANSPARENT); } else