mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Wrap title in detailview header
This commit is contained in:
parent
69356e9c43
commit
78d6e980ee
15
view.c
15
view.c
@ -113,12 +113,18 @@ void cView::DrawHeader(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Date and Time, Title, Subtitle
|
//Date and Time, Title, Subtitle
|
||||||
int yDateTime = border / 2;
|
|
||||||
int yTitle = (headerHeight - fontHeaderLarge->Height()) / 2;
|
|
||||||
int ySubtitle = headerHeight - fontHeader->Height() - border / 3;
|
|
||||||
int textWidthMax = headerWidth - xText - border / 2;
|
int textWidthMax = headerWidth - xText - border / 2;
|
||||||
|
wrapper.Set(title.c_str(), fontHeaderLarge, textWidthMax);
|
||||||
|
int lineHeight = fontHeaderLarge->Height();
|
||||||
|
int textLines = wrapper.Lines();
|
||||||
|
int yDateTime = border / 2;
|
||||||
|
int yTitle = (headerHeight - textLines * lineHeight) / 2;
|
||||||
|
int ySubtitle = headerHeight - fontHeader->Height() - border / 3;
|
||||||
|
|
||||||
pixmapHeader->DrawText(cPoint(xText, yDateTime), CutText(dateTime, textWidthMax, fontHeader).c_str(), theme.Color(clrFont), theme.Color(clrStatusHeader), fontHeader);
|
pixmapHeader->DrawText(cPoint(xText, yDateTime), CutText(dateTime, textWidthMax, fontHeader).c_str(), theme.Color(clrFont), theme.Color(clrStatusHeader), fontHeader);
|
||||||
pixmapHeader->DrawText(cPoint(xText, yTitle), CutText(title, textWidthMax, fontHeaderLarge).c_str(), theme.Color(clrFont), theme.Color(clrStatusHeader), fontHeaderLarge);
|
for (int i = 0; i < textLines; i++) {
|
||||||
|
pixmapHeader->DrawText(cPoint(xText, yTitle + i * lineHeight), wrapper.GetLine(i), theme.Color(clrFont), theme.Color(clrStatusHeader), fontHeaderLarge);
|
||||||
|
}
|
||||||
pixmapHeader->DrawText(cPoint(xText, ySubtitle), CutText(subTitle, textWidthMax, fontHeader).c_str(), theme.Color(clrFont), theme.Color(clrStatusHeader), fontHeader);
|
pixmapHeader->DrawText(cPoint(xText, ySubtitle), CutText(subTitle, textWidthMax, fontHeader).c_str(), theme.Color(clrFont), theme.Color(clrStatusHeader), fontHeader);
|
||||||
//REC Icon
|
//REC Icon
|
||||||
eTimerMatch timerMatch = tmNone;
|
eTimerMatch timerMatch = tmNone;
|
||||||
@ -481,7 +487,6 @@ bool cView::KeyUp(void) {
|
|||||||
if (!scrollable)
|
if (!scrollable)
|
||||||
return false;
|
return false;
|
||||||
int aktHeight = pixmapContent->DrawPort().Point().Y();
|
int aktHeight = pixmapContent->DrawPort().Point().Y();
|
||||||
// int lineHeight = font->Height();
|
|
||||||
if (aktHeight >= 0) {
|
if (aktHeight >= 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
1
view.h
1
view.h
@ -51,6 +51,7 @@ protected:
|
|||||||
int contentHeight;
|
int contentHeight;
|
||||||
int tabHeight;
|
int tabHeight;
|
||||||
int scrollbarWidth;
|
int scrollbarWidth;
|
||||||
|
cTextWrapper wrapper;
|
||||||
std::vector<std::string> tabs;
|
std::vector<std::string> tabs;
|
||||||
std::string title;
|
std::string title;
|
||||||
std::string subTitle;
|
std::string subTitle;
|
||||||
|
Loading…
Reference in New Issue
Block a user