From 06f66b73480cd179b8c343b2af823fd61b54d9cd Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 8 Feb 2014 22:43:03 +0100 Subject: [PATCH] pluginlist: don't show full list when pluginlist-size is smaller Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/b427c3d6a559c61285728b220982f1b288d6a9dd Author: vanhofen Date: 2014-02-08 (Sat, 08 Feb 2014) Origin message was: ------------------ - pluginlist: don't show full list when pluginlist-size is smaller ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/pluginlist.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/pluginlist.cpp b/src/gui/pluginlist.cpp index 879b2cb2b..41e6eece0 100644 --- a/src/gui/pluginlist.cpp +++ b/src/gui/pluginlist.cpp @@ -324,7 +324,10 @@ void CPluginList::paint() width = w_max( 500, 0 ); height = h_max( 526, 50 ); // 2*25 pixel frei listmaxshow = (height-theight-0)/fheight; - height = theight+0+listmaxshow*fheight; // recalc height + int multiplicator = pluginlist.size(); + if (listmaxshow < pluginlist.size()) + multiplicator = listmaxshow; + height = theight+0+multiplicator*fheight; // recalc height x=getScreenStartX( width ); y=getScreenStartY( height );