summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflat@schirrmacher.eu>2013-08-03 17:20:54 +0200
committerMartin Schirrmacher <vdr.skinflat@schirrmacher.eu>2013-08-03 17:20:54 +0200
commit3d22892d17188a55ba9b144860d6525e42f4d618 (patch)
treea68574264081a09d3ae1e2919e71bbf90eedb721
parent67003cbe4786962638225ca9632a8855574d602b (diff)
downloadskin-flat-3d22892d17188a55ba9b144860d6525e42f4d618.tar.gz
skin-flat-3d22892d17188a55ba9b144860d6525e42f4d618.tar.bz2
fix replay menu
-rw-r--r--baserender.c31
-rw-r--r--displayreplay.c32
2 files changed, 40 insertions, 23 deletions
diff --git a/baserender.c b/baserender.c
index f59c5dc..c307195 100644
--- a/baserender.c
+++ b/baserender.c
@@ -316,6 +316,8 @@ void cFlatBaseRender::ProgressBarDrawMarks(int Current, int Total, const cMarks
int top = progressBarHeight / 2 - 3;
progressBarPixmap->Fill( progressBarColorBg );
+
+ // the small line
progressBarPixmap->DrawRectangle(cRect( 0, top + 2, progressBarWidth, 2), progressBarColorFg);
if( Marks ) {
@@ -347,16 +349,20 @@ void cFlatBaseRender::ProgressBarDrawMark(int posMark, int posMarkLast, int posC
int top = progressBarHeight / 2 - 3;
if( Start ) {
+ if( posCurrent > posMark )
+ progressBarPixmap->DrawRectangle(cRect( posMarkLast, top + 2, posMark - posMarkLast, 2), progressBarColorMarkCurrent);
+ else {
+ // marker
+ progressBarPixmap->DrawRectangle(cRect( posCurrent - 3, top, 6, 6), progressBarColorMarkCurrent);
+ if( posCurrent > posMarkLast )
+ progressBarPixmap->DrawRectangle(cRect( posMarkLast, top + 2, posCurrent - posMarkLast, 2), progressBarColorMarkCurrent);
+ }
+
if( isCurrent )
progressBarPixmap->DrawRectangle(cRect( posMark-5, 0, 10, 3), progressBarColorMarkCurrent);
else
progressBarPixmap->DrawRectangle(cRect( posMark-3, 0, 6, 3), progressBarColorMark);
} else {
- if( isCurrent )
- progressBarPixmap->DrawRectangle(cRect( posMark-5, progressBarHeight - 3, 10, 3), progressBarColorMarkCurrent);
- else
- progressBarPixmap->DrawRectangle(cRect( posMark-3, progressBarHeight - 3, 6, 3), progressBarColorMark);
-
if( posCurrent > posMark )
progressBarPixmap->DrawRectangle(cRect( posMarkLast, top, posMark - posMarkLast, 6), progressBarColorMarkCurrent);
else {
@@ -364,10 +370,21 @@ void cFlatBaseRender::ProgressBarDrawMark(int posMark, int posMarkLast, int posC
if( posCurrent > posMarkLast )
progressBarPixmap->DrawRectangle(cRect( posMarkLast, top, posCurrent - posMarkLast, 6), progressBarColorMarkCurrent);
}
+
+ if( isCurrent )
+ progressBarPixmap->DrawRectangle(cRect( posMark-5, progressBarHeight - 3, 10, 3), progressBarColorMarkCurrent);
+ else
+ progressBarPixmap->DrawRectangle(cRect( posMark-3, progressBarHeight - 3, 6, 3), progressBarColorMark);
}
- if( isCurrent )
- progressBarPixmap->DrawRectangle(cRect( posMark-1, 0, 2, progressBarHeight), progressBarColorMarkCurrent);
+ if( posCurrent == posMark )
+ progressBarPixmap->DrawRectangle(cRect( posMark-2, 0, 4, progressBarHeight), progressBarColorMarkCurrent);
else
progressBarPixmap->DrawRectangle(cRect( posMark-1, 0, 2, progressBarHeight), progressBarColorMark);
+
+ if( posCurrent == posMarkLast )
+ progressBarPixmap->DrawRectangle(cRect( posMarkLast-2, 0, 4, progressBarHeight), progressBarColorMarkCurrent);
+ else
+ progressBarPixmap->DrawRectangle(cRect( posMarkLast-1, 0, 2, progressBarHeight), progressBarColorMark);
+
}
diff --git a/displayreplay.c b/displayreplay.c
index 363066a..3b16905 100644
--- a/displayreplay.c
+++ b/displayreplay.c
@@ -1,7 +1,7 @@
#include "displayreplay.h"
cFlatDisplayReplay::cFlatDisplayReplay(bool ModeOnly) {
- labelHeight = fontHeight;
+ labelHeight = fontHeight + fontSmlHeight;
current = "";
total = "";
@@ -15,7 +15,7 @@ cFlatDisplayReplay::cFlatDisplayReplay(bool ModeOnly) {
ProgressBarCreate(0, osdHeight - labelHeight - ProgressBarHeight() - marginItem, osdWidth,
Theme.Color(clrReplayProgressFg), Theme.Color(clrReplayProgressBarFg), Theme.Color(clrReplayProgressBg));
- labelJump = osd->CreatePixmap(1, cRect(0, osdHeight - labelHeight*2 - ProgressBarHeight() - marginItem*2, osdWidth, labelHeight));
+ labelJump = osd->CreatePixmap(1, cRect(0, osdHeight - labelHeight - ProgressBarHeight() - marginItem*2 - fontHeight, osdWidth, fontHeight));
labelPixmap->Fill(Theme.Color(clrReplayBg));
labelJump->Fill(clrTransparent);
@@ -36,7 +36,7 @@ void cFlatDisplayReplay::SetRecording(const cRecording *Recording) {
else
info = cString::sprintf("%s %s", *ShortDateString(Recording->Start()), *TimeString(Recording->Start()));
- labelPixmap->DrawText(cPoint(0, 0), info, Theme.Color(clrReplayFont), Theme.Color(clrReplayBg), font, osdWidth);
+ labelPixmap->DrawText(cPoint(0, fontHeight), info, Theme.Color(clrReplayFont), Theme.Color(clrReplayBg), fontSml, osdWidth);
}
void cFlatDisplayReplay::SetTitle(const char *Title) {
@@ -45,12 +45,12 @@ void cFlatDisplayReplay::SetTitle(const char *Title) {
void cFlatDisplayReplay::SetMode(bool Play, bool Forward, int Speed) {
if( Setup.ShowReplayMode ) {
- int left = osdWidth - (labelHeight * 4 + marginItem * 3);
+ int left = osdWidth - (fontHeight * 4 + marginItem * 3);
left /= 2;
iconsPixmap->Fill(clrTransparent);
- labelPixmap->DrawRectangle(cRect( left - font->Width("33") - marginItem, 0, labelHeight*4 + marginItem*6 + font->Width("33")*2, labelHeight), Theme.Color(clrReplayBg) );
+ labelPixmap->DrawRectangle(cRect( left - font->Width("33") - marginItem, 0, fontHeight*4 + marginItem*6 + font->Width("33")*2, fontHeight), Theme.Color(clrReplayBg) );
cString rewind, pause, play, forward;
cString speed;
@@ -74,7 +74,7 @@ void cFlatDisplayReplay::SetMode(bool Play, bool Forward, int Speed) {
pause = "pause";
play = "play";
forward = "forward_sel";
- labelPixmap->DrawText(cPoint(left + labelHeight*4 + marginItem*4, 0), speed, Theme.Color(clrReplayFont), Theme.Color(clrReplayBg), font);
+ labelPixmap->DrawText(cPoint(left + fontHeight*4 + marginItem*4, 0), speed, Theme.Color(clrReplayFont), Theme.Color(clrReplayBg), font);
} else {
rewind = "rewind_sel";
pause = "pause";
@@ -84,14 +84,14 @@ void cFlatDisplayReplay::SetMode(bool Play, bool Forward, int Speed) {
}
}
- if( imgLoader.LoadIcon(*rewind, labelHeight, labelHeight) )
+ if( imgLoader.LoadIcon(*rewind, fontHeight, fontHeight) )
iconsPixmap->DrawImage( cPoint(left, 0), imgLoader.GetImage() );
- if( imgLoader.LoadIcon(*pause, labelHeight, labelHeight) )
- iconsPixmap->DrawImage( cPoint(left + labelHeight + marginItem, 0), imgLoader.GetImage() );
- if( imgLoader.LoadIcon(*play, labelHeight, labelHeight) )
- iconsPixmap->DrawImage( cPoint(left + labelHeight*2 + marginItem*2, 0), imgLoader.GetImage() );
- if( imgLoader.LoadIcon(*forward, labelHeight, labelHeight) )
- iconsPixmap->DrawImage( cPoint(left + labelHeight*3 + marginItem*3, 0), imgLoader.GetImage() );
+ if( imgLoader.LoadIcon(*pause, fontHeight, fontHeight) )
+ iconsPixmap->DrawImage( cPoint(left + fontHeight + marginItem, 0), imgLoader.GetImage() );
+ if( imgLoader.LoadIcon(*play, fontHeight, fontHeight) )
+ iconsPixmap->DrawImage( cPoint(left + fontHeight*2 + marginItem*2, 0), imgLoader.GetImage() );
+ if( imgLoader.LoadIcon(*forward, fontHeight, fontHeight) )
+ iconsPixmap->DrawImage( cPoint(left + fontHeight*3 + marginItem*3, 0), imgLoader.GetImage() );
}
}
@@ -111,9 +111,9 @@ void cFlatDisplayReplay::SetTotal(const char *Total) {
}
void cFlatDisplayReplay::UpdateInfo(void) {
- cString Info = cString::sprintf("%s - %s", *current, *total);
- int right = osdWidth - font->Width(Info);
- labelPixmap->DrawText(cPoint(right, 0), Info, Theme.Color(clrReplayFont), Theme.Color(clrReplayBg), font, font->Width(Info), fontHeight);
+ int right = osdWidth - font->Width(total);
+ labelPixmap->DrawText(cPoint(0, 0), current, Theme.Color(clrReplayFont), Theme.Color(clrReplayBg), font, font->Width(current), fontHeight);
+ labelPixmap->DrawText(cPoint(right, 0), total, Theme.Color(clrReplayFont), Theme.Color(clrReplayBg), font, font->Width(total), fontHeight);
}
void cFlatDisplayReplay::SetJump(const char *Jump) {