Skip to content

Commit

Permalink
Report: Make <th> elemnts bold in report_table
Browse files Browse the repository at this point in the history
  • Loading branch information
nikicc committed Oct 11, 2017
1 parent a85299b commit 41f4f8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Orange/canvas/report/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@
padding: 2px 6px 2px 6px;
}

th {
font-weight: bold;
}

@media screen {
td, th {
white-space: nowrap;
Expand Down
4 changes: 2 additions & 2 deletions Orange/canvas/report/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def data(role=Qt.DisplayRole,
bgcolor = 'transparent'

font = data(Qt.FontRole)
weight = 'bold' if font and font.bold() else 'normal'
weight = 'font-weight: bold;' if font and font.bold() else ''

alignment = data(Qt.TextAlignmentRole) or Qt.AlignLeft
halign = ('left' if alignment & Qt.AlignLeft else
Expand All @@ -254,7 +254,7 @@ def data(role=Qt.DisplayRole,
'color:{fgcolor};'
'border:{border};'
'background:{bgcolor};'
'font-weight:{weight};'
'{weight}'
'text-align:{halign};'
'vertical-align:{valign};">{text}</{tag}>'.format(
tag='th' if row is None or col is None else 'td',
Expand Down

0 comments on commit 41f4f8f

Please sign in to comment.