]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed bug in selection style if selection colours is not constant
authorVáclav Slavík <vslavik@fastmail.fm>
Wed, 4 Jun 2003 00:18:22 +0000 (00:18 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Wed, 4 Jun 2003 00:18:22 +0000 (00:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/html/htmlcell.cpp

index 7aca669ec5dbebc2b7db35b790d1ea0298dcb6ed..3fbef604ee1b3a6d8a7bc71183286c0ba3881be7 100644 (file)
@@ -58,7 +58,7 @@ void wxHtmlSelection::Set(wxHtmlCell *fromCell, wxHtmlCell *toCell)
 }
 
 wxColour wxDefaultHtmlRenderingStyle::GetSelectedTextColour(
-                                        const wxColour& WXUNUSED(clr))
+                                        const wxColour& clr)
 {
     return wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
 }
@@ -353,7 +353,7 @@ void wxHtmlWordCell::Draw(wxDC& dc, int x, int y,
         wxString txt;
         int w, h;
         int ofs = 0;
-        
+       
         wxPoint priv = (this == s->GetFromCell()) ? 
                            s->GetFromPrivPos() : s->GetToPrivPos();
         int part1 = priv.x;
@@ -1003,13 +1003,19 @@ void wxHtmlColourCell::DrawInvisible(wxDC& dc,
     {
         state.SetFgColour(m_Colour);
         if (state.GetSelectionState() != wxHTML_SEL_IN)
-            dc.SetTextForeground(m_Colour);        
+            dc.SetTextForeground(m_Colour);
+        else
+            dc.SetTextForeground(
+                    info.GetStyle().GetSelectedTextColour(m_Colour));
     }
     if (m_Flags & wxHTML_CLR_BACKGROUND)
     {
         state.SetBgColour(m_Colour);
         if (state.GetSelectionState() != wxHTML_SEL_IN)
             dc.SetTextBackground(m_Colour);
+        else
+            dc.SetTextBackground(
+                    info.GetStyle().GetSelectedTextBgColour(m_Colour));
         dc.SetBackground(wxBrush(m_Colour, wxSOLID));
     }
 }