mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Implemented cSkinCursesDisplayMenu::SetScrollbar(); fixed calculating the scrollbar sizes in the skins
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: skinclassic.c 1.24 2008/02/17 13:55:54 kls Exp $
|
||||
* $Id: skinclassic.c 1.25 2008/02/17 14:23:36 kls Exp $
|
||||
*/
|
||||
|
||||
#include "skinclassic.h"
|
||||
@@ -233,11 +233,11 @@ void cSkinClassicDisplayMenu::DrawScrollbar(int Total, int Offset, int Shown, in
|
||||
{
|
||||
if (Total > 0 && Total > Shown) {
|
||||
int yt = Top;
|
||||
int yb = yt + Height;
|
||||
int yb = yt + Height - 1;
|
||||
int st = yt;
|
||||
int sb = yb;
|
||||
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;
|
||||
int xl = x3 - ScrollWidth;
|
||||
osd->DrawRectangle(xl, st, x3 - 1, sb, Theme.Color(clrMenuScrollbarTotal));
|
||||
osd->DrawRectangle(xl, tt, x3 - 1, tb, Theme.Color(clrMenuScrollbarShown));
|
||||
|
||||
Reference in New Issue
Block a user