From 83d7a4b7838a8209c05c53b5e625bf965d3bf585 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 24 Feb 2008 18:00:00 +0100 Subject: =?UTF-8?q?Version=201.5.16=20-=20Fixed=20setting=20the=20current?= =?UTF-8?q?=20subtitle=20track=20in=20Transfer-Mode=20(reported=20by=20Pet?= =?UTF-8?q?ri=20Helin,=20=20=20thanks=20to=20Reinhard=20Nissl=20for=20poin?= =?UTF-8?q?ting=20out=20that=20cDevice::Transferring()=20doesn't=20=20=20r?= =?UTF-8?q?eturn=20the=20right=20value=20in=20the=20early=20stage=20of=20c?= =?UTF-8?q?hannel=20switching).=20-=20Updated=20the=20Danish=20OSD=20texts?= =?UTF-8?q?=20(thanks=20to=20Mogens=20Elneff).=20-=20Updated=20the=20Dutch?= =?UTF-8?q?=20OSD=20texts=20(thanks=20to=20Carel=20Willemse).=20-=20Fixed?= =?UTF-8?q?=20various=20spelling=20errors=20and=20improved=20PLUGINS.html?= =?UTF-8?q?=20(thanks=20to=20Ville=20Skytt=C3=A4).=20-=20Updated=20the=20I?= =?UTF-8?q?talian=20OSD=20texts=20(thanks=20to=20Diego=20Pierotto).=20-=20?= =?UTF-8?q?Fixed=20the=20format=20in=20cRemote::Put()=20to=20use=20"%016ll?= =?UTF-8?q?X"=20instead=20of=20"%016LX"=20(thanks=20=20=20to=20Ludwig=20Nu?= =?UTF-8?q?ssel=20for=20pointing=20this=20out).=20-=20Revised=20the=20fix?= =?UTF-8?q?=20of=20calculating=20the=20scrollbar=20height=20in=20the=20ski?= =?UTF-8?q?ns.=20The=20scrollbar=20=20=20handle=20now=20always=20has=20a?= =?UTF-8?q?=20height=20that=20is=20at=20least=20the=20width=20of=20the=20s?= =?UTF-8?q?crollbar.=20-=20When=20switching=20the=20device=20that's=20used?= =?UTF-8?q?=20for=20live=20viewing=20away=20from=20the=20current=20=20=20t?= =?UTF-8?q?ransponder=20in=20favor=20of=20an=20upcoming=20recording,=20an?= =?UTF-8?q?=20attempt=20is=20now=20made=20to=20stay=20=20=20on=20the=20cur?= =?UTF-8?q?rent=20channel=20by=20possibly=20going=20into=20'Transfer=20Mod?= =?UTF-8?q?e'.=20-=20The=20CAM=20menu=20now=20stays=20open=20as=20long=20a?= =?UTF-8?q?s=20it=20is=20automatically=20updated,=20even=20without=20=20?= =?UTF-8?q?=20pressing=20a=20remote=20control=20key.=20This=20is=20importa?= =?UTF-8?q?nt=20when=20updating=20the=20CAM=20firmware=20=20=20from=20the?= =?UTF-8?q?=20transponder.=20-=20No=20longer=20trying=20to=20switch=20to?= =?UTF-8?q?=20an=20available=20channel=20if=20the=20primary=20device=20has?= =?UTF-8?q?=20=20=20no=20valid=20programme=20and=20a=20menu=20is=20open=20?= =?UTF-8?q?(avoids=20interference=20with=20the=20CAM=20in=20=20=20case=20a?= =?UTF-8?q?=20CAM=20menu=20is=20open).=20-=20Increased=20the=20valid=20ran?= =?UTF-8?q?ge=20of=20the=20"Subtitle=20offset"=20setup=20option=20to=20-10?= =?UTF-8?q?0...100=20=20=20(thanks=20to=20Rolf=20Ahrenberg).=20-=20Added?= =?UTF-8?q?=20the=20backslash=20('\')=20to=20the=20list=20of=20characters?= =?UTF-8?q?=20that=20need=20to=20be=20escaped=20=20=20when=20executing=20e?= =?UTF-8?q?xternal=20commands=20(thanks=20to=20Peter=20Bieringer=20for=20r?= =?UTF-8?q?eporting=20this=20one).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PLUGINS/src/skincurses/HISTORY | 5 +++++ PLUGINS/src/skincurses/skincurses.c | 15 ++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'PLUGINS') diff --git a/PLUGINS/src/skincurses/HISTORY b/PLUGINS/src/skincurses/HISTORY index 45b79bb..6088c8b 100644 --- a/PLUGINS/src/skincurses/HISTORY +++ b/PLUGINS/src/skincurses/HISTORY @@ -70,3 +70,8 @@ VDR Plugin 'skincurses' Revision History - Using cString::sprintf() instead of asprintf(). - Implemented cSkinCursesDisplayMenu::SetScrollbar(). + +2008-02-23: Version 0.1.6 + +- Revised the fix of calculating the scrollbar height in the skins. The scrollbar + handle now always has a height that is at least the width of the scrollbar. diff --git a/PLUGINS/src/skincurses/skincurses.c b/PLUGINS/src/skincurses/skincurses.c index 2f0bea9..ed30a5e 100644 --- a/PLUGINS/src/skincurses/skincurses.c +++ b/PLUGINS/src/skincurses/skincurses.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: skincurses.c 1.20 2008/02/17 14:28:19 kls Exp $ + * $Id: skincurses.c 1.22 2008/02/23 10:38:04 kls Exp $ */ #include @@ -11,7 +11,7 @@ #include #include -static const char *VERSION = "0.1.5"; +static const char *VERSION = "0.1.6"; static const char *DESCRIPTION = trNOOP("A text only skin"); static const char *MAINMENUENTRY = NULL; @@ -296,14 +296,15 @@ void cSkinCursesDisplayMenu::DrawScrollbar(int Total, int Offset, int Shown, int { if (Total > 0 && Total > Shown) { int yt = Top; - int yb = yt + Height - 1; + int yb = yt + Height; int st = yt; int sb = yb; - int tt = st + (sb - st + 1) * Offset / Total; - int tb = tt + (sb - st + 1) * Shown / Total; + int th = max(int((sb - st) * double(Shown) / Total + 0.5), 1); + int tt = min(int(st + (sb - st) * double(Offset) / Total + 0.5), sb - th); + int tb = min(tt + th, sb); int xl = ScOsdWidth - 1; - osd->DrawRectangle(xl, st, xl, sb, clrWhite); - osd->DrawRectangle(xl, tt, xl, tb, clrCyan); + osd->DrawRectangle(xl, st, xl, sb - 1, clrWhite); + osd->DrawRectangle(xl, tt, xl, tb - 1, clrCyan); } } -- cgit v1.2.3