Mangled Item/Ship description content to respect current theme
This commit is contained in:
@@ -185,11 +185,14 @@ class ItemDescription ( wx.Panel ):
|
||||
mainSizer = wx.BoxSizer(wx.VERTICAL)
|
||||
self.SetSizer(mainSizer)
|
||||
|
||||
bgcolor = wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOW)
|
||||
fgcolor = wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOWTEXT)
|
||||
|
||||
self.description = wx.html.HtmlWindow(self)
|
||||
desc = item.description.replace("\r","<br>")
|
||||
desc = re.sub("<( *)font( *)color( *)=(.*)>", "<b>", desc)
|
||||
desc = re.sub("<( *)/( *)font( *)>","</b>", desc)
|
||||
desc = "<body bgcolor='" + bgcolor.GetAsString(wx.C2S_HTML_SYNTAX) + "' text='" + fgcolor.GetAsString(wx.C2S_HTML_SYNTAX) + "' >" + desc + "</body>"
|
||||
|
||||
self.description.SetPage(desc)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user