diff options
author | louis <louis.braun@gmx.de> | 2014-04-27 14:44:37 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2014-04-27 14:44:37 +0200 |
commit | 38130733958e6860ad90cc98175bad4b650f8327 (patch) | |
tree | dac3e10a1b5707b465556533a10630bde6864a92 /detailview.c | |
parent | 70e79d0684e1cc12989fb039111195209dcda85f (diff) | |
download | skin-nopacity-38130733958e6860ad90cc98175bad4b650f8327.tar.gz skin-nopacity-38130733958e6860ad90cc98175bad4b650f8327.tar.bz2 |
scroll speed with up / down configurable (lines per click)
Diffstat (limited to 'detailview.c')
-rw-r--r-- | detailview.c | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/detailview.c b/detailview.c index 5d25200..aea4006 100644 --- a/detailview.c +++ b/detailview.c @@ -369,11 +369,15 @@ bool cNopacityView::KeyUp(void) { return false;
int aktHeight = pixmapContent->DrawPort().Point().Y();
int lineHeight = font->Height();
- if (aktHeight < 0) {
- pixmapContent->SetDrawPortPoint(cPoint(0, aktHeight + lineHeight));
- return true;
+ if (aktHeight >= 0) {
+ return false;
}
- return false;
+ int step = config.GetValue("detailedViewScrollStep") * font->Height();
+ int newY = aktHeight + step;
+ if (newY > 0)
+ newY = 0;
+ pixmapContent->SetDrawPortPoint(cPoint(0, newY));
+ return true;
}
bool cNopacityView::KeyDown(void) {
@@ -382,12 +386,16 @@ bool cNopacityView::KeyDown(void) { int aktHeight = pixmapContent->DrawPort().Point().Y();
int totalHeight = pixmapContent->DrawPort().Height();
int screenHeight = pixmapContent->ViewPort().Height();
- int lineHeight = font->Height();
- if (totalHeight - ((-1)*aktHeight) > screenHeight) {
- pixmapContent->SetDrawPortPoint(cPoint(0, aktHeight - lineHeight));
- return true;
- }
- return false;
+
+ if (totalHeight - ((-1)*aktHeight) == screenHeight) {
+ return false;
+ }
+ int step = config.GetValue("detailedViewScrollStep") * font->Height();
+ int newY = aktHeight - step;
+ if ((-1)*newY > totalHeight - screenHeight)
+ newY = (-1)*(totalHeight - screenHeight);
+ pixmapContent->SetDrawPortPoint(cPoint(0, newY));
+ return true;
}
/********************************************************************************************
@@ -791,7 +799,9 @@ void cNopacitySeriesView::Action(void) { osd->Flush();
headerDrawn = true;
}
- SetTabs();
+ if (tabs.size() == 0) {
+ SetTabs();
+ }
DrawTabs();
int randomPoster = GetRandomPoster();
switch (activeView) {
@@ -1026,7 +1036,9 @@ void cNopacityMovieView::Action(void) { osd->Flush();
headerDrawn = true;
}
- SetTabs();
+ if (tabs.size() == 0) {
+ SetTabs();
+ }
DrawTabs();
bool posterAvailable = (movie.poster.path.size() > 0 && movie.poster.width > 0 && movie.poster.height > 0) ? true : false;
switch (activeView) {
|