mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
pluginlist: using CComponentsHeader to paint header
* fix scrollbar painting
Origin commit data
------------------
Commit: b1f2f4dc98
Author: vanhofen <vanhofen@gmx.de>
Date: 2013-06-27 (Thu, 27 Jun 2013)
Origin message was:
------------------
- pluginlist: using CComponentsHeader to paint header
* fix scrollbar painting
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include <plugin.h>
|
||||
|
||||
#include <gui/pluginlist.h>
|
||||
#include <gui/components/cc_frm.h>
|
||||
#include <gui/widget/messagebox.h>
|
||||
#include <gui/widget/icons.h>
|
||||
|
||||
@@ -301,23 +302,18 @@ void CPluginList::paintItem(int pos)
|
||||
|
||||
void CPluginList::paintHead()
|
||||
{
|
||||
if(listmaxshow > pluginlist.size()+1)
|
||||
frameBuffer->paintBoxRel(x,y, width,theight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);
|
||||
else
|
||||
frameBuffer->paintBoxRel(x,y, width+15,theight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);
|
||||
int h_width = width;
|
||||
if (listmaxshow < pluginlist.size())
|
||||
h_width += 15;
|
||||
|
||||
CComponentsHeader header(x, y, h_width, theight, name, NULL /* no header icon */);
|
||||
|
||||
if (pluginlisttype == CPlugins::P_TYPE_GAME)
|
||||
{
|
||||
frameBuffer->paintIcon(NEUTRINO_ICON_GAMES,x+8,y+5);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+38,y+theight+1, width, g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8
|
||||
} else if (pluginlisttype == CPlugins::P_TYPE_SCRIPT)
|
||||
{
|
||||
frameBuffer->paintIcon(NEUTRINO_ICON_SHELL,x+8,y+5);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+38,y+theight+1, width, g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8
|
||||
} else
|
||||
{
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+8,y+theight+1, width, g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8
|
||||
}
|
||||
header.setIcon(NEUTRINO_ICON_GAMES);
|
||||
else if (pluginlisttype == CPlugins::P_TYPE_SCRIPT)
|
||||
header.setIcon(NEUTRINO_ICON_SHELL);
|
||||
|
||||
header.paint(CC_SAVE_SCREEN_NO);
|
||||
}
|
||||
|
||||
void CPluginList::paint()
|
||||
@@ -338,7 +334,7 @@ void CPluginList::paint()
|
||||
|
||||
void CPluginList::paintItems()
|
||||
{
|
||||
if(listmaxshow <= pluginlist.size()+1)
|
||||
if(listmaxshow < pluginlist.size())
|
||||
{
|
||||
// Scrollbar
|
||||
int nrOfPages = ((pluginlist.size()-1) / listmaxshow)+1;
|
||||
|
Reference in New Issue
Block a user