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 <plugin.h>
|
||||||
|
|
||||||
#include <gui/pluginlist.h>
|
#include <gui/pluginlist.h>
|
||||||
|
#include <gui/components/cc_frm.h>
|
||||||
#include <gui/widget/messagebox.h>
|
#include <gui/widget/messagebox.h>
|
||||||
#include <gui/widget/icons.h>
|
#include <gui/widget/icons.h>
|
||||||
|
|
||||||
@@ -301,23 +302,18 @@ void CPluginList::paintItem(int pos)
|
|||||||
|
|
||||||
void CPluginList::paintHead()
|
void CPluginList::paintHead()
|
||||||
{
|
{
|
||||||
if(listmaxshow > pluginlist.size()+1)
|
int h_width = width;
|
||||||
frameBuffer->paintBoxRel(x,y, width,theight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);
|
if (listmaxshow < pluginlist.size())
|
||||||
else
|
h_width += 15;
|
||||||
frameBuffer->paintBoxRel(x,y, width+15,theight, COL_MENUHEAD_PLUS_0, RADIUS_LARGE, CORNER_TOP);
|
|
||||||
|
CComponentsHeader header(x, y, h_width, theight, name, NULL /* no header icon */);
|
||||||
|
|
||||||
if (pluginlisttype == CPlugins::P_TYPE_GAME)
|
if (pluginlisttype == CPlugins::P_TYPE_GAME)
|
||||||
{
|
header.setIcon(NEUTRINO_ICON_GAMES);
|
||||||
frameBuffer->paintIcon(NEUTRINO_ICON_GAMES,x+8,y+5);
|
else if (pluginlisttype == CPlugins::P_TYPE_SCRIPT)
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+38,y+theight+1, width, g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8
|
header.setIcon(NEUTRINO_ICON_SHELL);
|
||||||
} else if (pluginlisttype == CPlugins::P_TYPE_SCRIPT)
|
|
||||||
{
|
header.paint(CC_SAVE_SCREEN_NO);
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPluginList::paint()
|
void CPluginList::paint()
|
||||||
@@ -338,7 +334,7 @@ void CPluginList::paint()
|
|||||||
|
|
||||||
void CPluginList::paintItems()
|
void CPluginList::paintItems()
|
||||||
{
|
{
|
||||||
if(listmaxshow <= pluginlist.size()+1)
|
if(listmaxshow < pluginlist.size())
|
||||||
{
|
{
|
||||||
// Scrollbar
|
// Scrollbar
|
||||||
int nrOfPages = ((pluginlist.size()-1) / listmaxshow)+1;
|
int nrOfPages = ((pluginlist.size()-1) / listmaxshow)+1;
|
||||||
|
Reference in New Issue
Block a user