Skip to content

Commit

Permalink
Guide Grid: Fix missing text when using QT painter
Browse files Browse the repository at this point in the history
Grid icons, arrows and record status, caused text to show as blank.
Changed to paint the text first, which resolves the issue.

Fixes #13398

(cherry picked from commit f561a3c)
  • Loading branch information
bennettpeter committed Feb 10, 2019
1 parent 1c2068c commit c6760c6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions mythtv/libs/libmythui/mythuiguidegrid.cpp
Expand Up @@ -329,6 +329,7 @@ void MythUIGuideGrid::DrawSelf(MythPainter *p, int xoffset, int yoffset,
drawBox(p, xoffset, yoffset, data, m_recordingColor, alphaMod);
else
drawBox(p, xoffset, yoffset, data, m_conflictingColor, alphaMod);
drawText(p, xoffset, yoffset, data, alphaMod);
}
}

Expand All @@ -341,10 +342,7 @@ void MythUIGuideGrid::DrawSelf(MythPainter *p, int xoffset, int yoffset,
for (; it != m_allData[i].end(); ++it)
{
UIGTCon *data = *it;
drawText(p, xoffset, yoffset, data, alphaMod);

if (data->m_recType != 0 || data->m_arrow != GridTimeNormal)
drawRecDecoration(p, xoffset, yoffset, data, alphaMod);
drawRecDecoration(p, xoffset, yoffset, data, alphaMod);
}
}
}
Expand Down Expand Up @@ -690,6 +688,9 @@ void MythUIGuideGrid::drawText(MythPainter *p, int xoffset, int yoffset, UIGTCon
if (area.width() <= 0 || area.height() <= 0)
return;

const char *msgx = QString("DrawText title=%1")
.arg(msg).toLocal8Bit();
fprintf(stderr,"%s\n", msgx);
p->DrawText(area, msg, m_justification, *m_font, alphaMod, area);
}

Expand Down

0 comments on commit c6760c6

Please sign in to comment.