summaryrefslogtreecommitdiff
path: root/baserender.c
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2013-11-06 19:19:00 +0100
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2013-11-06 19:19:00 +0100
commit11e6acd1be1276b301535d2c6f5095f542ca0e9c (patch)
treec85df721dc0a9c694ccbbd4068dd6d3bf351d6f7 /baserender.c
parente4024a0b5b0ebe4c27b9c8390cd2d845d992606e (diff)
downloadskin-flatplus-11e6acd1be1276b301535d2c6f5095f542ca0e9c.tar.gz
skin-flatplus-11e6acd1be1276b301535d2c6f5095f542ca0e9c.tar.bz2
fix marker first line in replay
Diffstat (limited to 'baserender.c')
-rw-r--r--baserender.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/baserender.c b/baserender.c
index 4e70ecd5..8d8d0486 100644
--- a/baserender.c
+++ b/baserender.c
@@ -272,8 +272,13 @@ void cFlatBaseRender::ContentCreate(int Left, int Top, int Width, int Height) {
contentHeight = lines * fontHeight;
}
-void cFlatBaseRender::ContentSet(const char *Text, tColor ColorFg, tColor ColorBg) {
- contentWrapper.Set(Text, font, contentWidth - marginItem*2);
+void cFlatBaseRender::ContentSet(const char *Text, bool FixedFont, tColor ColorFg, tColor ColorBg) {
+ contentFixedFont = FixedFont;
+ if( FixedFont )
+ contentWrapper.Set(Text, fontFixed, contentWidth - marginItem*2);
+ else
+ contentWrapper.Set(Text, font, contentWidth - marginItem*2);
+
contentColorFg = ColorFg;
contentColorBg = ColorBg;
@@ -376,7 +381,10 @@ void cFlatBaseRender::contentDraw(void) {
int currentHeight = 0;
for (int i=0; i < linesText; i++) {
currentHeight = (i)*fontHeight;
- contentPixmap->DrawText(cPoint(marginItem, currentHeight), contentWrapper.GetLine(i), contentColorFg, contentColorBg, font, contentWidth - marginItem*2);
+ if( contentFixedFont )
+ contentPixmap->DrawText(cPoint(marginItem, currentHeight), contentWrapper.GetLine(i), contentColorFg, contentColorBg, fontFixed, contentWidth - marginItem*2);
+ else
+ contentPixmap->DrawText(cPoint(marginItem, currentHeight), contentWrapper.GetLine(i), contentColorFg, contentColorBg, font, contentWidth - marginItem*2);
}
}
@@ -598,8 +606,9 @@ void cFlatBaseRender::ProgressBarDrawMarks(int Current, int Total, const cMarks
// the small line
progressBarPixmap->DrawRectangle(cRect( 0, top - sml/2, progressBarWidth, sml), progressBarColorFg);
-
+
bool Start = true;
+
for( const cMark *m = Marks->First(); m; m = Marks->Next(m) ) {
posMark = ProgressBarMarkPos( m->Position(), Total );
posCurrent = ProgressBarMarkPos( Current, Total );
@@ -627,7 +636,6 @@ 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) {
@@ -686,10 +694,10 @@ void cFlatBaseRender::ProgressBarDrawMark(int posMark, int posMarkLast, int posC
else
progressBarPixmap->DrawRectangle(cRect( posMark - mbig/2, progressBarHeight - sml, mbig, sml), progressBarColorMark);
}
-
- if( posCurrent == posMarkLast )
+
+ if( posCurrent == posMarkLast && posMarkLast != 0 )
progressBarPixmap->DrawRectangle(cRect( posMarkLast - sml, 0, sml*2, progressBarHeight), progressBarColorMarkCurrent);
- else
+ else if( posMarkLast != 0 )
progressBarPixmap->DrawRectangle(cRect( posMarkLast - sml/2, 0, sml, progressBarHeight), progressBarColorMark);
}