Skip to content

Commit

Permalink
Manager: Use wxHtmlWindow in DlgItemProperties.
Browse files Browse the repository at this point in the history
Add font face and color attributes

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
  • Loading branch information
AenBleidd authored and ChristianBeer committed Jan 29, 2018
1 parent b07661e commit 8e3ab60
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions clientgui/DlgItemProperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,10 +524,16 @@ wxString CDlgItemProperties::FormatApplicationName(RESULT* result ) {
void CDlgItemProperties::renderInfos() {
wxString str_bg;
str_bg.Printf(wxT("#%x"), this->GetBackgroundColour().GetRGB());
wxString str_fg;
str_fg.Printf(wxT("#%x"), this->GetForegroundColour().GetRGB());

std::string content;
content += "<html>";
content += "<body bgcolor='" + str_bg + "'>";
content += "<font";
content += " color='" + str_fg + "' ";
content += " face='" + this->GetFont().GetFaceName() + "' ";
content += ">";
content += "<table width='100%'>";
for (size_t i = 0; i < m_items.size(); ++i) {
if (m_items[i].item_type == ItemTypeSection) {
Expand All @@ -550,6 +556,7 @@ void CDlgItemProperties::renderInfos() {
}
}
content += "</table>";
content += "</font>";
content += "</body>";
content += "</html>";
m_txtInformation->SetPage(content);
Expand Down

0 comments on commit 8e3ab60

Please sign in to comment.