mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +02:00
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:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user