summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2013-11-03 11:38:52 +0100
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2013-11-03 11:38:52 +0100
commite4024a0b5b0ebe4c27b9c8390cd2d845d992606e (patch)
tree13319bed39dbc3ba2e03c69c0c1b0f95eee6d636
parentb37329118c3fad7e5a286280d7d0a3ed47b562a7 (diff)
downloadskin-flatplus-e4024a0b5b0ebe4c27b9c8390cd2d845d992606e.tar.gz
skin-flatplus-e4024a0b5b0ebe4c27b9c8390cd2d845d992606e.tar.bz2
fix marker, fix osd size
-rw-r--r--baserender.c17
-rw-r--r--baserender.h2
-rw-r--r--displaychannel.c16
-rw-r--r--displaychannel.h1
4 files changed, 28 insertions, 8 deletions
diff --git a/baserender.c b/baserender.c
index aed366b0..4e70ecd5 100644
--- a/baserender.c
+++ b/baserender.c
@@ -62,10 +62,13 @@ cFlatBaseRender::~cFlatBaseRender(void) {
}
void cFlatBaseRender::CreateFullOsd(void) {
+ //printf("left: %d top: %d width: %d height: %d", cOsd::OsdLeft(), cOsd::OsdTop(), cOsd::OsdWidth(), cOsd::OsdHeight());
CreateOsd(cOsd::OsdLeft() + Config.marginOsdHor, cOsd::OsdTop() + Config.marginOsdVer, cOsd::OsdWidth() - Config.marginOsdHor*2, cOsd::OsdHeight() - Config.marginOsdVer*2);
}
void cFlatBaseRender::CreateOsd(int left, int top, int width, int height) {
+ osdLeft = left;
+ osdTop = top;
osdWidth = width;
osdHeight = height;
@@ -605,10 +608,17 @@ void cFlatBaseRender::ProgressBarDrawMarks(int Current, int Total, const cMarks
posMarkLast = posMark;
Start = !Start;
}
+
+ // draw last marker vertical line
+ if( posCurrent == posMark )
+ progressBarPixmap->DrawRectangle(cRect( posMark - sml, 0, sml*2, progressBarHeight), progressBarColorMarkCurrent);
+ else
+ progressBarPixmap->DrawRectangle(cRect( posMark - sml/2, 0, sml, progressBarHeight), progressBarColorMark);
+
if( !Start ) {
- progressBarPixmap->DrawRectangle(cRect( posMarkLast, top - big/2, progressBarWidth - posMarkLast, big), progressBarColorBarFg);
+ //progressBarPixmap->DrawRectangle(cRect( posMarkLast + sml/2, top - big/2, progressBarWidth - posMarkLast, big), progressBarColorBarFg);
if( posCurrent > posMarkLast )
- progressBarPixmap->DrawRectangle(cRect( posMarkLast, top - big/2, posCurrent - posMarkLast, big), progressBarColorBarCurFg);
+ progressBarPixmap->DrawRectangle(cRect( posMarkLast + sml/2, top - big/2, posCurrent - posMarkLast, big), progressBarColorBarCurFg);
} else {
// marker
progressBarPixmap->DrawRectangle(cRect( posMarkLast, top - sml/2, posCurrent - posMarkLast, sml), progressBarColorBarCurFg);
@@ -617,6 +627,7 @@ void cFlatBaseRender::ProgressBarDrawMarks(int Current, int Total, const cMarks
if( posCurrent > posMarkLast + sml/2 )
progressBarPixmap->DrawRectangle(cRect( posMarkLast - sml/2, 0, sml, progressBarHeight), progressBarColorMark);
}
+
}
int cFlatBaseRender::ProgressBarMarkPos(int P, int Total) {
@@ -761,7 +772,7 @@ void cFlatBaseRender::DecorBorderDraw(int Left, int Top, int Width, int Height,
int BottomDecor = Height + Size;
if( !decorPixmap ) {
- decorPixmap = osd->CreatePixmap(4, cRect(cOsd::OsdLeft(), cOsd::OsdTop(), cOsd::OsdWidth(), cOsd::OsdHeight()));
+ decorPixmap = osd->CreatePixmap(4, cRect(0, 0, cOsd::OsdWidth(), cOsd::OsdHeight()));
decorPixmap->Fill(clrTransparent);
}
diff --git a/baserender.h b/baserender.h
index 5a51f8a7..277ee4ee 100644
--- a/baserender.h
+++ b/baserender.h
@@ -18,7 +18,7 @@ class cFlatBaseRender
protected:
cOsd *osd;
- int osdWidth, osdHeight;
+ int osdLeft, osdTop, osdWidth, osdHeight;
int marginItem;
// Standard fonts
diff --git a/displaychannel.c b/displaychannel.c
index aac466c9..6c09d6a9 100644
--- a/displaychannel.c
+++ b/displaychannel.c
@@ -31,11 +31,15 @@ cFlatDisplayChannel::cFlatDisplayChannel(bool WithInfo) {
int height = heightBottom;
chanInfoBottomPixmap = osd->CreatePixmap(1, cRect(Config.decorBorderChannelSize,
Config.decorBorderChannelSize+channelHeight - height, channelWidth, heightBottom));
+ chanInfoBottomPixmap->Fill(clrTransparent);
chanIconsPixmap = osd->CreatePixmap(2, cRect(Config.decorBorderChannelSize,
Config.decorBorderChannelSize+channelHeight - height, channelWidth, heightBottom));
+ chanIconsPixmap->Fill(clrTransparent);
+
chanLogoPixmap = osd->CreatePixmap(2, cRect(Config.decorBorderChannelSize,
Config.decorBorderChannelSize+channelHeight - height, heightBottom, heightBottom));
+ chanLogoPixmap->Fill(clrTransparent);
height += Config.decorProgressChannelSize + marginItem*2;
ProgressBarCreate(Config.decorBorderChannelSize, Config.decorBorderChannelSize+channelHeight - height + marginItem,
@@ -45,7 +49,8 @@ cFlatDisplayChannel::cFlatDisplayChannel(bool WithInfo) {
height += heightTop;
chanInfoTopPixmap = osd->CreatePixmap(1, cRect(Config.decorBorderChannelSize,
Config.decorBorderChannelSize+channelHeight - height, channelWidth, heightTop));
-
+ chanInfoTopPixmap->Fill(clrTransparent);
+
DecorBorderDraw(Config.decorBorderChannelSize, Config.decorBorderChannelSize+channelHeight - height,
channelWidth, heightTop + heightBottom + Config.decorProgressChannelSize+marginItem*2,
Config.decorBorderChannelSize, Config.decorBorderChannelType, Config.decorBorderChannelFg, Config.decorBorderChannelBg);
@@ -67,6 +72,7 @@ cFlatDisplayChannel::~cFlatDisplayChannel() {
void cFlatDisplayChannel::SetChannel(const cChannel *Channel, int Number) {
cString channelNumber("");
isRecording = false;
+ chanIconsPixmap->Fill(clrTransparent);
if (Channel) {
channelName = Channel->Name();
if (!Channel->GroupSep())
@@ -74,8 +80,7 @@ void cFlatDisplayChannel::SetChannel(const cChannel *Channel, int Number) {
else if (Number)
channelNumber = cString::sprintf("%d-", Number);
- if( Config.ChannelIconsShow )
- ChannelIconsDraw(Channel, false);
+ CurChannel = Channel;
} else
channelName = ChannelString(NULL, 0);
@@ -164,6 +169,7 @@ void cFlatDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Followi
chanInfoBottomPixmap->Fill(Theme.Color(clrChannelBg));
chanLogoPixmap->Fill(clrTransparent);
+ chanIconsPixmap->Fill(clrTransparent);
int imageHeight = heightBottom - marginItem*2;
if( imgLoader.LoadLogo(*channelName, imageHeight, imageHeight) ) {
@@ -258,6 +264,8 @@ void cFlatDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Followi
chanInfoBottomPixmap->DrawText(cPoint(left, fontHeight*2 + fontSmlHeight), *epgShort,
Theme.Color(clrChannelFontEpgFollow), Theme.Color(clrChannelBg), fontSml);
}
+ if( Config.ChannelIconsShow && CurChannel )
+ ChannelIconsDraw(CurChannel, false);
}
void cFlatDisplayChannel::SetMessage(eMessageType Type, const char *Text) {
@@ -316,7 +324,7 @@ void cFlatDisplayChannel::Flush(void) {
double aspect;
cDevice::PrimaryDevice()->GetVideoSize(screenWidth, screenHeight, aspect);
if (screenWidth != lastScreenWidth) {
- ChannelIconsDraw(NULL, true);
+ ChannelIconsDraw(CurChannel, true);
screenWidth = lastScreenWidth;
}
}
diff --git a/displaychannel.h b/displaychannel.h
index 4af53814..24374ebe 100644
--- a/displaychannel.h
+++ b/displaychannel.h
@@ -9,6 +9,7 @@ class cFlatDisplayChannel : public cFlatBaseRender, public cSkinDisplayChannel {
int channelWidth, channelHeight;
cString channelName;
+ const cChannel *CurChannel;
cPixmap *chanInfoTopPixmap;
cPixmap *chanInfoBottomPixmap;