port rounded corner code from tuxbox CVSuse getScreenStartX(),getScreenStartY(),h_max(),w_max() routines

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@87 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Commit: 49e009134b
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2009-12-17 (Thu, 17 Dec 2009)
This commit is contained in:
Jacek Jendrzej
2009-12-17 09:58:55 +00:00
parent fe0b30c986
commit e1f3340cbb
11 changed files with 1109 additions and 1077 deletions

View File

@@ -54,6 +54,7 @@
#include <neutrino.h>
#include <plugins.h>
#include <driver/encoding.h>
#include <driver/screen_max.h>
#include <zapit/client/zapittools.h>
@@ -76,12 +77,8 @@ CPluginList::CPluginList(const neutrino_locale_t Name, const uint32_t listtype)
name = Name;
pluginlisttype = listtype;
selected = 0;
width = 500;
if(width>(g_settings.screen_EndX-g_settings.screen_StartX))
width=(g_settings.screen_EndX-g_settings.screen_StartX);
height = 526;
if((height+50)>(g_settings.screen_EndY-g_settings.screen_StartY))
height=(g_settings.screen_EndY-g_settings.screen_StartY) - 50; // 2*25 pixel frei
width = w_max( 500, 0 );
height = h_max( 526, 50 ); // 2*25 pixel frei
theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
//
fheight1 = g_Font[SNeutrinoSettings::FONT_TYPE_GAMELIST_ITEMLARGE]->getHeight();
@@ -90,8 +87,8 @@ CPluginList::CPluginList(const neutrino_locale_t Name, const uint32_t listtype)
//
listmaxshow = (height-theight-0)/fheight;
height = theight+0+listmaxshow*fheight; // recalc height
x=(((g_settings.screen_EndX- g_settings.screen_StartX)-width) / 2) + g_settings.screen_StartX;
y=(((g_settings.screen_EndY- g_settings.screen_StartY)-height) / 2) + g_settings.screen_StartY;
x=getScreenStartX( width );
y=getScreenStartY( height );
liststart = 0;
}
@@ -310,16 +307,12 @@ void CPluginList::paintHead()
void CPluginList::paint()
{
hide();
width = 500;
if(width>(g_settings.screen_EndX-g_settings.screen_StartX))
width=(g_settings.screen_EndX-g_settings.screen_StartX);
height = 526;
if((height+50)>(g_settings.screen_EndY-g_settings.screen_StartY))
height=(g_settings.screen_EndY-g_settings.screen_StartY) - 50; // 2*25 pixel frei
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
x=(((g_settings.screen_EndX- g_settings.screen_StartX)-width) / 2) + g_settings.screen_StartX;
y=(((g_settings.screen_EndY- g_settings.screen_StartY)-height) / 2) + g_settings.screen_StartY;
x=getScreenStartX( width );
y=getScreenStartY( height );
liststart = (selected/listmaxshow)*listmaxshow;