summaryrefslogtreecommitdiff
path: root/skinsttng.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2008-02-17 14:29:24 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2008-02-17 14:29:24 +0100
commit31a0318de43966ec3d06139492e8b39dcafc7eac (patch)
tree0d709ca79c16387aab4409d2f436d5b801e4ff6d /skinsttng.c
parent484821fa0a86091cc7cc08f629a8ac98629b072f (diff)
downloadvdr-31a0318de43966ec3d06139492e8b39dcafc7eac.tar.gz
vdr-31a0318de43966ec3d06139492e8b39dcafc7eac.tar.bz2
Implemented cSkinCursesDisplayMenu::SetScrollbar(); fixed calculating the scrollbar sizes in the skins1.5.15
Diffstat (limited to 'skinsttng.c')
-rw-r--r--skinsttng.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/skinsttng.c b/skinsttng.c
index 02ab61b5..0aa22b72 100644
--- a/skinsttng.c
+++ b/skinsttng.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: skinsttng.c 1.25 2008/02/17 13:35:09 kls Exp $
+ * $Id: skinsttng.c 1.26 2008/02/17 14:23:45 kls Exp $
*/
// Star Trek: The Next Generation® is a registered trademark of Paramount Pictures
@@ -442,11 +442,11 @@ void cSkinSTTNGDisplayMenu::DrawScrollbar(int Total, int Offset, int Shown, int
if (Total > 0 && Total > Shown) {
int h = lineHeight;
int yt = Top;
- int yb = yt + Height;
+ int yb = yt + Height - 1;
int st = yt + h + Gap;
int sb = yb - h - Gap;
- int tt = st + (sb - st) * Offset / Total;
- int tb = tt + (sb - st) * Shown / Total;
+ int tt = st + (sb - st + 1) * Offset / Total;
+ int tb = tt + (sb - st + 1) * Shown / Total;
osd->DrawRectangle(x5, st, x5 + ScrollWidth - 1, sb, Theme.Color(clrMenuScrollbarTotal));
osd->DrawRectangle(x5, tt, x5 + ScrollWidth - 1, tb, Theme.Color(clrMenuScrollbarShown));
osd->DrawRectangle(x5, yt, x6 - 1, yt + h - 1, frameColor);