mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Revert "Diplay the current TimeBase throughout the whole timeline"
This reverts commit b707292
because of a segfault.
This commit is contained in:
parent
fc784f34e5
commit
cdb5a46145
27
timeline.c
27
timeline.c
@ -17,6 +17,10 @@ cTimeLine::cTimeLine(cTimeManager *timeManager) {
|
||||
0,
|
||||
geoManager.timeLineWidth,
|
||||
1440*geoManager.minutePixel));
|
||||
timeBase = osdManager.requestPixmap(3, cRect(0,
|
||||
geoManager.statusHeaderHeight + geoManager.channelGroupsHeight + geoManager.channelHeaderHeight,
|
||||
geoManager.osdWidth,
|
||||
geoManager.timeLineGridHeight));
|
||||
} else if (config.displayMode == eHorizontal) {
|
||||
dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(geoManager.clockWidth,
|
||||
geoManager.statusHeaderHeight,
|
||||
@ -30,7 +34,12 @@ cTimeLine::cTimeLine(cTimeManager *timeManager) {
|
||||
0,
|
||||
1440*geoManager.minutePixel,
|
||||
geoManager.timeLineHeight));
|
||||
timeBase = osdManager.requestPixmap(3, cRect(geoManager.channelGroupsWidth + geoManager.channelHeaderWidth,
|
||||
geoManager.statusHeaderHeight,
|
||||
geoManager.timeLineGridWidth,
|
||||
geoManager.timeLineHeight + config.channelRows * geoManager.rowHeight));
|
||||
}
|
||||
timeBase->Fill(clrTransparent);
|
||||
int clockY;
|
||||
int clockX;
|
||||
if (config.displayMode == eVertical) {
|
||||
@ -198,29 +207,19 @@ void cTimeLine::drawRoundedCorners(int posX, int posY, int width, int height, in
|
||||
}
|
||||
|
||||
void cTimeLine::drawCurrentTimeBase(void) {
|
||||
timeBase->Fill(clrTransparent);
|
||||
bool nowVisible = timeManager->NowVisible();
|
||||
if (timeBase)
|
||||
osdManager.releasePixmap(timeBase);
|
||||
if (!nowVisible)
|
||||
return;
|
||||
int deltaTime = (timeManager->GetNow() - timeManager->GetStart()) / 60 * geoManager.minutePixel;
|
||||
int x1, x2, y1, y2;
|
||||
if (config.displayMode == eVertical) {
|
||||
x1 = 0;
|
||||
y1 = geoManager.statusHeaderHeight + geoManager.channelGroupsHeight + geoManager.channelHeaderHeight + deltaTime - 2;
|
||||
x2 = geoManager.osdWidth;
|
||||
y2 = 4;
|
||||
timeBase->DrawRectangle(cRect(0, deltaTime - 2, timeBase->ViewPort().Width(), 4), theme.Color(clrTimeBase));
|
||||
} else {
|
||||
x1 = geoManager.channelGroupsWidth + geoManager.channelHeaderWidth + deltaTime - 2;
|
||||
y1 = geoManager.statusHeaderHeight;
|
||||
x2 = 4;
|
||||
y2 = geoManager.timeLineHeight + config.channelRows * geoManager.rowHeight;
|
||||
timeBase->DrawRectangle(cRect(deltaTime-2, 0, 4, timeBase->ViewPort().Height()), theme.Color(clrTimeBase));
|
||||
}
|
||||
timeBase = osdManager.requestPixmap(3, cRect(x1, y1, x2, y2));
|
||||
timeBase->Fill(clrTransparent);
|
||||
timeBase->DrawRectangle(cRect(0, 0, timeBase->ViewPort().Width(), timeBase->ViewPort().Height()), theme.Color(clrTimeBase));
|
||||
}
|
||||
|
||||
|
||||
cImage *cTimeLine::createBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend) {
|
||||
cImage *image = NULL;
|
||||
if (config.style == eStyleBlendingDefault) {
|
||||
|
@ -126,6 +126,7 @@ bool cTimeManager::NowVisible(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void cTimeManager::debug() {
|
||||
esyslog("t: %s, tStart: %s, tEnd: %s", *TimeString(t), *TimeString(tStart), *TimeString(tEnd));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user