Final fix from '[ 1473731 ] wxColourBase and wxString <-> wxColour implementation'.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba 2006-06-16 10:42:07 +00:00
parent 3c15a15128
commit 6bdcf0b143

View File

@ -475,13 +475,16 @@ wxString MyHtmlListBox::OnGetItem(size_t n) const
return s;
#else
int level = n % 6 + 1;
wxString label = wxString::Format(_T("<h%d><font color=#%2x%2x%2x>")
wxColour clr(abs((int)n - 192) % 256,
abs((int)n - 256) % 256,
abs((int)n - 128) % 256);
wxString label = wxString::Format(_T("<h%d><font color=%s>")
_T("Item</font> <b>%lu</b>")
_T("</h%d>"),
level,
abs((int)n - 192) % 256,
abs((int)n - 256) % 256,
abs((int)n - 128) % 256,
clr.GetAsString(wxC2S_HTML_SYNTAX).c_str(),
(unsigned long)n, level);
if ( n == 1 )
{