diff options
author | louis <louis.braun@gmx.de> | 2013-09-17 13:25:12 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-09-17 13:25:12 +0200 |
commit | 8cac48f1606c6a48226141dd94a59101dd10b1e0 (patch) | |
tree | 1270186804f1b0394ef5e0e324aa59ab2b7800e6 /textwindow.c | |
parent | 82aa79801b08be8e1f22ba1c4a6778867322e246 (diff) | |
download | skin-nopacity-8cac48f1606c6a48226141dd94a59101dd10b1e0.tar.gz skin-nopacity-8cac48f1606c6a48226141dd94a59101dd10b1e0.tar.bz2 |
fixed a bug with rounded corners in message display
Diffstat (limited to 'textwindow.c')
-rw-r--r-- | textwindow.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/textwindow.c b/textwindow.c index 6273c9e..0277f29 100644 --- a/textwindow.c +++ b/textwindow.c @@ -253,6 +253,7 @@ void cNopacityTextWindow::SetRecording(const cRecording *recording) { int widthTextHeader = width - 2 * border; int widthText = widthTextHeader; int y = border; + //Image cImageLoader imgLoader; bool recImageFound = false; if (hasManualPoster) { @@ -291,7 +292,7 @@ void cNopacityTextWindow::SetRecording(const cRecording *recording) { int maxHeight = height - y; if ((hasPoster || hasManualPoster) && (y < (border + posterHeight))) { int heightNarrow = border + posterHeight - y; - DrawTextWrapperFloat(recording->Info()->Description(), + DrawTextWrapperFloat(recording->Info()->Description(), widthTextHeader, widthText, y, heightNarrow, border, font, Theme.Color(clrMenuFontDetailViewText), maxHeight); } else if (recImageFound && (y < (border + config.epgImageHeight))) { @@ -325,21 +326,22 @@ int cNopacityTextWindow::DrawTextWrapperFloat(const char *text, int widthSmall, tColor color, int maxHeight) { int lineHeight = font->Height(); int numLinesNarrow = heightNarrow / lineHeight + 1; - cTextWrapper test; test.Set(text, font, widthSmall); std::stringstream sstrTextTall; std::stringstream sstrTextFull; bool drawFull = false; + int numEmptyLinesAtEnd = 0; for (int line = 0; line < test.Lines(); line++) { bool lineWrap = false; - if (font->Width(test.GetLine(line)) < (widthSmall - 100)) + if (font->Width(test.GetLine(line)) < (widthSmall - 100)) { lineWrap = true; + } if (line < numLinesNarrow) { sstrTextTall << test.GetLine(line); - if (lineWrap) + if (lineWrap) { sstrTextTall << "\n"; - else + } else sstrTextTall << " "; } else { drawFull = true; @@ -350,7 +352,6 @@ int cNopacityTextWindow::DrawTextWrapperFloat(const char *text, int widthSmall, sstrTextFull << " "; } } - cTextWrapper wrapperNarrow; wrapperNarrow.Set(sstrTextTall.str().c_str(), font, widthSmall); int height = 2*font->Height(); |