mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 13:01:48 +00:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a711aed160 | ||
|
cdb5a46145 | ||
|
fc784f34e5 | ||
|
b707292485 | ||
|
587fbe1f44 | ||
|
9173d14b10 |
10
HISTORY
10
HISTORY
@@ -216,3 +216,13 @@ Version 1.2.11
|
||||
- Fixed a segfault with graphicsmagick > 1.3.31
|
||||
- Fixed a possible deadlock in detailview
|
||||
- Optical changes in cMenuSetupImageCache
|
||||
|
||||
Version 1.2.12
|
||||
|
||||
- Fixed updating current time
|
||||
- Fixed updating current TimeBase
|
||||
- Diplay the current TimeBase throughout the whole timeline
|
||||
|
||||
Version 1.2.13
|
||||
|
||||
- Revert "Diplay the current TimeBase throughout the whole timeline"
|
||||
|
34
timeline.c
34
timeline.c
@@ -3,6 +3,7 @@
|
||||
|
||||
cTimeLine::cTimeLine(cTimeManager *timeManager) {
|
||||
this->timeManager = timeManager;
|
||||
lastClock = "";
|
||||
if (config.displayMode == eVertical) {
|
||||
dateViewer = new cStyledPixmap(osdManager.requestPixmap(1, cRect(0,
|
||||
geoManager.statusHeaderHeight + geoManager.clockHeight,
|
||||
@@ -263,20 +264,25 @@ void cTimeLine::setTimeline() {
|
||||
drawCurrentTimeBase();
|
||||
}
|
||||
|
||||
void cTimeLine::drawClock() {
|
||||
if (config.displayMode == eVertical)
|
||||
clock->Fill(clrTransparent);
|
||||
bool cTimeLine::drawClock() {
|
||||
cString currentTime = timeManager->GetCurrentTime();
|
||||
const cFont *font = (config.displayMode == eVertical)?fontManager.FontTimeLineTime:fontManager.FontTimeLineTimeHorizontal;
|
||||
int textHeight = font->Height();
|
||||
int clockTextWidth = font->Width(*currentTime);
|
||||
tColor colorFontBack = (config.style == eStyleFlat)?theme.Color(clrHeader):clrTransparent;
|
||||
if (config.style == eStyleGraphical) {
|
||||
clock->drawBackgroundGraphical(bgClock);
|
||||
} else {
|
||||
clock->setColor(theme.Color(clrHeader), theme.Color(clrHeaderBlending));
|
||||
clock->drawBackground();
|
||||
clock->drawBorder();
|
||||
if (strcmp(currentTime, lastClock)) {
|
||||
if (config.displayMode == eVertical)
|
||||
clock->Fill(clrTransparent);
|
||||
const cFont *font = (config.displayMode == eVertical) ? fontManager.FontTimeLineTime : fontManager.FontTimeLineTimeHorizontal;
|
||||
int textHeight = font->Height();
|
||||
int clockTextWidth = font->Width(*currentTime);
|
||||
tColor colorFontBack = (config.style == eStyleFlat) ? theme.Color(clrHeader) : clrTransparent;
|
||||
if (config.style == eStyleGraphical) {
|
||||
clock->drawBackgroundGraphical(bgClock);
|
||||
} else {
|
||||
clock->setColor(theme.Color(clrHeader), theme.Color(clrHeaderBlending));
|
||||
clock->drawBackground();
|
||||
clock->drawBorder();
|
||||
}
|
||||
clock->DrawText(cPoint((geoManager.clockWidth - clockTextWidth) / 2, (geoManager.clockHeight - textHeight) / 2), *currentTime, theme.Color(clrFont), colorFontBack, font);
|
||||
lastClock = currentTime;
|
||||
return true;
|
||||
}
|
||||
clock->DrawText(cPoint((geoManager.clockWidth-clockTextWidth)/2, (geoManager.clockHeight-textHeight)/2), *currentTime, theme.Color(clrFont), colorFontBack, font);
|
||||
return false;
|
||||
}
|
||||
|
11
timeline.h
11
timeline.h
@@ -13,17 +13,18 @@ private:
|
||||
cPixmap *timeline;
|
||||
cStyledPixmap *clock;
|
||||
cPixmap *timeBase;
|
||||
cString lastClock;
|
||||
void decorateTile(int posX, int posY, int tileWidth, int tileHeight);
|
||||
void drawRoundedCorners(int posX, int posY, int width, int height, int radius);
|
||||
cImage *createBackgroundImage(int width, int height, tColor clrBgr, tColor clrBlend);
|
||||
void drawCurrentTimeBase(void);
|
||||
public:
|
||||
cTimeLine(cTimeManager *timeManager);
|
||||
virtual ~cTimeLine(void);
|
||||
void setTimeline();
|
||||
void drawDateViewer();
|
||||
void drawTimeline();
|
||||
void drawClock();
|
||||
void setTimeline(void);
|
||||
void drawDateViewer(void);
|
||||
void drawTimeline(void);
|
||||
void drawCurrentTimeBase(void);
|
||||
bool drawClock();
|
||||
};
|
||||
|
||||
#endif //__TVGUIDE_TIMELINE_H
|
||||
|
@@ -27,7 +27,7 @@
|
||||
#error "VDR-2.0.0 API version or greater is required!"
|
||||
#endif
|
||||
|
||||
static const char *VERSION = "1.2.11";
|
||||
static const char *VERSION = "1.2.13";
|
||||
static const char *DESCRIPTION = tr("A fancy 2d EPG Viewer");
|
||||
static const char *MAINMENUENTRY = "Tvguide";
|
||||
|
||||
|
10
tvguideosd.c
10
tvguideosd.c
@@ -352,7 +352,7 @@ void cTvGuideOsd::channelBack() {
|
||||
|
||||
void cTvGuideOsd::timeForward() {
|
||||
bool actionDone = false;
|
||||
if ( (timeManager->GetEnd() - activeGrid->EndTime())/60 < 30 ) {
|
||||
if ((timeManager->GetEnd() - activeGrid->EndTime())/60 < 30 ) {
|
||||
ScrollForward();
|
||||
actionDone = true;
|
||||
}
|
||||
@@ -373,7 +373,6 @@ void cTvGuideOsd::timeForward() {
|
||||
void cTvGuideOsd::ScrollForward() {
|
||||
timeManager->AddStep(config.stepMinutes);
|
||||
timeLine->drawDateViewer();
|
||||
timeLine->drawClock();
|
||||
timeLine->setTimeline();
|
||||
for (cChannelEpg *column = columns.First(); column; column = columns.Next(column)) {
|
||||
column->AddNewGridsAtEnd();
|
||||
@@ -384,7 +383,7 @@ void cTvGuideOsd::ScrollForward() {
|
||||
|
||||
void cTvGuideOsd::timeBack() {
|
||||
bool actionDone = false;
|
||||
if ( (activeGrid->StartTime() - timeManager->GetStart())/60 < 30 ) {
|
||||
if ((activeGrid->StartTime() - timeManager->GetStart())/60 < 30 ) {
|
||||
ScrollBack();
|
||||
actionDone = true;
|
||||
}
|
||||
@@ -408,7 +407,6 @@ void cTvGuideOsd::ScrollBack() {
|
||||
if (tooFarInPast)
|
||||
return;
|
||||
timeLine->drawDateViewer();
|
||||
timeLine->drawClock();
|
||||
timeLine->setTimeline();
|
||||
for (cChannelEpg *column = columns.First(); column; column = columns.Next(column)) {
|
||||
column->AddNewGridsAtStart();
|
||||
@@ -776,6 +774,10 @@ eOSState cTvGuideOsd::ProcessKey(eKeys Key) {
|
||||
case kNone: if (channelJumper) CheckTimeout(); break;
|
||||
default: break;
|
||||
}
|
||||
if (timeLine->drawClock()) {
|
||||
timeLine->drawCurrentTimeBase();
|
||||
osdManager.flush();
|
||||
}
|
||||
}
|
||||
if (!alreadyUnlocked) {
|
||||
cPixmap::Unlock();
|
||||
|
Reference in New Issue
Block a user