Project "Tuxbox-GIT: apps":

The branch, master has been updated
       via  d6bcf33965d34cb70960f271e687ce87541fa6e4 (commit)
      from  76fec7853d6086cbcca771c9f11e6d6259db6523 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d6bcf33965d34cb70960f271e687ce87541fa6e4
Author: Christian Schuett <gaucho...@hotmail.com>
Date:   Thu May 9 21:04:24 2013 +0200

    Neutrino: add shadow to games and scripts menu and ...
    
    ... fix scrollbar visibility
    
    Signed-off-by: Christian Schuett <gaucho...@hotmail.com>
    Signed-off-by: Thilo Graf <d...@novatux.de>

diff --git a/tuxbox/neutrino/src/gui/pluginlist.cpp 
b/tuxbox/neutrino/src/gui/pluginlist.cpp
index cc46e71..90373ed 100644
--- a/tuxbox/neutrino/src/gui/pluginlist.cpp
+++ b/tuxbox/neutrino/src/gui/pluginlist.cpp
@@ -203,7 +203,7 @@ int CPluginList::exec(CMenuTarget* parent, const 
std::string & /*actionKey*/)
 void CPluginList::hide()
 {
        int c_rad_mid = RADIUS_MID;
-       frameBuffer->paintBackgroundBoxRel(x, y, width + 15, height + 
((c_rad_mid * 2) + 1));
+       frameBuffer->paintBackgroundBoxRel(x, y, width + sb_width + 
SHADOW_OFFSET, height + (c_rad_mid / 3 * 2) + SHADOW_OFFSET);
 }
 
 void CPluginList::paintItem(int pos)
@@ -255,15 +255,7 @@ void CPluginList::paintItem(int pos)
 
 void CPluginList::paintHead()
 {
-       int sb_width = 0;
-       if(listmaxshow <= pluginlist.size()+1)
-               sb_width=15;
-
-       int c_rad_mid = RADIUS_MID;
-
-       frameBuffer->paintBoxRel(x, y + height - ((c_rad_mid * 2) + 1) + 
(c_rad_mid / 3 * 2), width + sb_width, ((c_rad_mid * 2) + 1), 
COL_MENUCONTENT_PLUS_0, c_rad_mid, CORNER_BOTTOM);
-       frameBuffer->paintBoxRel(x, y, width + sb_width, theight, 
COL_MENUHEAD_PLUS_0, c_rad_mid, CORNER_TOP);
-       frameBuffer->paintBoxRel(x, y + theight, width, height- theight - 
((c_rad_mid * 2) + 1) + (c_rad_mid / 3 * 2), COL_MENUCONTENT_PLUS_0);
+       frameBuffer->paintBoxRel(x, y, width + sb_width, theight, 
COL_MENUHEAD_PLUS_0, RADIUS_MID, CORNER_TOP);
 
        int iconoffset = 0;
        if(pluginlisttype == CPlugins::P_TYPE_GAME)
@@ -284,7 +276,8 @@ void CPluginList::paintHead()
 
 void CPluginList::paint()
 {
-       hide();
+       int c_rad_mid = RADIUS_MID;
+
        width = w_max (500, 100);
        height = h_max (526, 50);
        theight  = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
@@ -295,20 +288,24 @@ void CPluginList::paint()
        //
        listmaxshow = (height-theight-0)/fheight;
        height = theight+0+listmaxshow*fheight; // recalc height
-       x = getScreenStartX (width);
-       y = getScreenStartY (height);
-       
-   liststart = (selected/listmaxshow)*listmaxshow;
+       sb_width = (pluginlist.size() > listmaxshow) ? 15 : 0;
+       x = getScreenStartX(width + sb_width);
+       y = getScreenStartY(height + (c_rad_mid / 3 * 2));
+
+       liststart = (selected/listmaxshow)*listmaxshow;
 
        CLCD::getInstance()->setMode(CLCD::MODE_MENU_UTF8, 
g_Locale->getText(name));
 
+       frameBuffer->paintBoxRel(x + SHADOW_OFFSET, y + SHADOW_OFFSET, width + 
sb_width, height + (c_rad_mid / 3 * 2), COL_MENUCONTENTDARK_PLUS_0, c_rad_mid);
+       frameBuffer->paintBoxRel(x, y + height - ((c_rad_mid * 2) + 1) + 
(c_rad_mid / 3 * 2), width + sb_width, ((c_rad_mid * 2) + 1), 
COL_MENUCONTENT_PLUS_0, c_rad_mid, CORNER_BOTTOM);
+
        paintHead();
        paintItems();
 }
 
 void CPluginList::paintItems()
 {
-       if(listmaxshow <= pluginlist.size()+1)
+       if(pluginlist.size() > listmaxshow)
        {
                // Scrollbar
                int nrOfPages = ((pluginlist.size()-1) / listmaxshow)+1; 
@@ -345,9 +342,9 @@ void CPluginList::updateSelection(unsigned int newpos)
 CPluginList::result_ CPluginList::pluginSelected()
 {
        g_PluginList->startPlugin(pluginlist[selected]->number);
+       hide();
        if (!g_PluginList->getScriptOutput().empty())
        {
-               hide();
                ShowMsgUTF(LOCALE_PLUGINS_RESULT, 
Latin1_to_UTF8(g_PluginList->getScriptOutput()),
                                   
CMessageBox::mbrBack,CMessageBox::mbBack,NEUTRINO_ICON_SHELL);
        }
diff --git a/tuxbox/neutrino/src/gui/pluginlist.h 
b/tuxbox/neutrino/src/gui/pluginlist.h
index 23eeab7..c721108 100644
--- a/tuxbox/neutrino/src/gui/pluginlist.h
+++ b/tuxbox/neutrino/src/gui/pluginlist.h
@@ -73,6 +73,7 @@ class CPluginList : public CMenuTarget
                int             fheight1,fheight2;
 
                int             width;
+               int             sb_width;
                int             height;
                int             x;
                int             y;

-----------------------------------------------------------------------

Summary of changes:
 tuxbox/neutrino/src/gui/pluginlist.cpp |   31 ++++++++++++++-----------------
 tuxbox/neutrino/src/gui/pluginlist.h   |    1 +
 2 files changed, 15 insertions(+), 17 deletions(-)


-- 
Tuxbox-GIT: apps

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Tuxbox-cvs-commits mailing list
Tuxbox-cvs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tuxbox-cvs-commits

Reply via email to