diff --git a/src/gui/pluginlist.cpp b/src/gui/pluginlist.cpp index dfa8f6bd6..c74ab285e 100644 --- a/src/gui/pluginlist.cpp +++ b/src/gui/pluginlist.cpp @@ -36,6 +36,7 @@ #include #include +#include #include #include @@ -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; - 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 - } + CComponentsHeader header(x, y, h_width, theight, name, NULL /* no header icon */); + + if (pluginlisttype == CPlugins::P_TYPE_GAME) + 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;