The style listbox now takes into account the style background colour if specified.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -740,11 +740,20 @@ wxString wxRichTextStyleListBox::CreateHTML(wxRichTextStyleDefinition* def) cons
|
|||||||
if (attr.HasAlignment() && attr.GetAlignment() == wxTEXT_ALIGNMENT_CENTRE)
|
if (attr.HasAlignment() && attr.GetAlignment() == wxTEXT_ALIGNMENT_CENTRE)
|
||||||
isCentred = true;
|
isCentred = true;
|
||||||
|
|
||||||
|
str << wxT("<html><head></head>");
|
||||||
|
str << wxT("<body");
|
||||||
|
if (attr.GetBackgroundColour().Ok())
|
||||||
|
str << wxT(" bgcolor=\"#") << ColourToHexString(attr.GetBackgroundColour()) << wxT("\"");
|
||||||
|
str << wxT(">");
|
||||||
|
|
||||||
if (isCentred)
|
if (isCentred)
|
||||||
str << wxT("<center>");
|
str << wxT("<center>");
|
||||||
|
|
||||||
|
str << wxT("<table");
|
||||||
|
if (attr.GetBackgroundColour().Ok())
|
||||||
|
str << wxT(" bgcolor=\"#") << ColourToHexString(attr.GetBackgroundColour()) << wxT("\"");
|
||||||
|
|
||||||
str << wxT("<table><tr>");
|
str << wxT("><tr>");
|
||||||
|
|
||||||
if (attr.GetLeftIndent() > 0)
|
if (attr.GetLeftIndent() > 0)
|
||||||
{
|
{
|
||||||
@@ -837,6 +846,9 @@ wxString wxRichTextStyleListBox::CreateHTML(wxRichTextStyleDefinition* def) cons
|
|||||||
if (attr.GetTextColour().IsOk())
|
if (attr.GetTextColour().IsOk())
|
||||||
str << wxT(" color=\"#") << ColourToHexString(attr.GetTextColour()) << wxT("\"");
|
str << wxT(" color=\"#") << ColourToHexString(attr.GetTextColour()) << wxT("\"");
|
||||||
|
|
||||||
|
if (attr.GetBackgroundColour().Ok())
|
||||||
|
str << wxT(" bgcolor=\"#") << ColourToHexString(attr.GetBackgroundColour()) << wxT("\"");
|
||||||
|
|
||||||
str << wxT(">");
|
str << wxT(">");
|
||||||
|
|
||||||
bool hasBold = false;
|
bool hasBold = false;
|
||||||
@@ -876,6 +888,7 @@ wxString wxRichTextStyleListBox::CreateHTML(wxRichTextStyleDefinition* def) cons
|
|||||||
if (isCentred)
|
if (isCentred)
|
||||||
str << wxT("</center>");
|
str << wxT("</center>");
|
||||||
|
|
||||||
|
str << wxT("</body></html>");
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user