fixed bug in selection style if selection colours is not constant

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2003-06-04 00:18:22 +00:00
parent 285f58ab66
commit bfc248a3f9

View File

@@ -58,7 +58,7 @@ void wxHtmlSelection::Set(wxHtmlCell *fromCell, wxHtmlCell *toCell)
} }
wxColour wxDefaultHtmlRenderingStyle::GetSelectedTextColour( wxColour wxDefaultHtmlRenderingStyle::GetSelectedTextColour(
const wxColour& WXUNUSED(clr)) const wxColour& clr)
{ {
return wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT); return wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
} }
@@ -1004,12 +1004,18 @@ void wxHtmlColourCell::DrawInvisible(wxDC& dc,
state.SetFgColour(m_Colour); state.SetFgColour(m_Colour);
if (state.GetSelectionState() != wxHTML_SEL_IN) 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) if (m_Flags & wxHTML_CLR_BACKGROUND)
{ {
state.SetBgColour(m_Colour); state.SetBgColour(m_Colour);
if (state.GetSelectionState() != wxHTML_SEL_IN) if (state.GetSelectionState() != wxHTML_SEL_IN)
dc.SetTextBackground(m_Colour); dc.SetTextBackground(m_Colour);
else
dc.SetTextBackground(
info.GetStyle().GetSelectedTextBgColour(m_Colour));
dc.SetBackground(wxBrush(m_Colour, wxSOLID)); dc.SetBackground(wxBrush(m_Colour, wxSOLID));
} }
} }