From 97c5f35c27dc65f3bc2ee9fe338f7341d65f1446 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=BCnther?= Date: Sun, 12 Jul 2009 13:06:31 +0200 Subject: Draw replay progress bar symmetrically --- HISTORY | 1 + render.c | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/HISTORY b/HISTORY index e65e3d1..4cb1c61 100644 --- a/HISTORY +++ b/HISTORY @@ -92,6 +92,7 @@ ____-__-__: Version 1.3 happens to be installed. (closes #36) - Compile internal image quantizing code only in Imlib2 builds. - Add support for building with GraphicsMagick. +- Draw replay progress bar symmetrically 2009-06-01: Version 1.2 diff --git a/render.c b/render.c index 80a83a2..1b7cf9c 100644 --- a/render.c +++ b/render.c @@ -604,7 +604,7 @@ void cText2SkinRender::DrawProgressbar(const txPoint &Pos, const txSize &Size, i const cMark *m2 = Marks->Next(m); DrawRectangle(txPoint(pt.x, Pos.y + Size.h / 3), txSize(((m2 ? m2->position : Total) - m->position) - * Size.w / Total, Size.h / 3), Selected); + * Size.w / Total, Size.h - Size.h * 2 / 3), Selected); } DrawMark(pt, Size, start, m->position == Current, false, Mark, Cur); start = !start; @@ -620,7 +620,8 @@ void cText2SkinRender::DrawProgressbar(const txPoint &Pos, const txSize &Size, i if (Selected && start) { const cMark *m2 = Marks->Next(m); DrawRectangle(txPoint(Pos.x + Size.w / 3, pt.y), - txSize(Size.w / 3, ((m2 ? m2->position : Total) - m->position) + txSize(Size.w - Size.w * 2 / 3, + ((m2 ? m2->position : Total) - m->position) * Size.h / Total), Selected); } DrawMark(pt, Size, start, m->position == Current, true, Mark, Cur); @@ -642,7 +643,7 @@ void cText2SkinRender::DrawMark(const txPoint &Pos, const txSize &Size, bool Sta const tColor *col = Current ? Cur : Mark; int h = Start ? i : Size.w - 1 - i; if (col) - DrawRectangle(txPoint(Pos.x + h, Pos.y - d + i), txSize(1, (d - i) * 2), col); + DrawRectangle(txPoint(Pos.x + h, Pos.y - d + i), txSize(1, (d - i) * 2 + 1), col); } } else { if (Mark) @@ -652,7 +653,7 @@ void cText2SkinRender::DrawMark(const txPoint &Pos, const txSize &Size, bool Sta const tColor *col = Current ? Cur : Mark; int h = Start ? i : Size.h - 1 - i; if (col) - DrawRectangle(txPoint(Pos.x - d + i, Pos.y + h), txSize((d - i) * 2, 1), col); + DrawRectangle(txPoint(Pos.x - d + i, Pos.y + h), txSize((d - i) * 2 + 1, 1), col); } } } -- cgit v1.2.3