From 48e1faeb918a9adbd46ae4496ae832fb1248ece0 Mon Sep 17 00:00:00 2001 From: satbaby Date: Tue, 28 Sep 2010 11:55:34 +0000 Subject: [PATCH] -fix osd git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@804 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/screensetup.cpp | 27 ++++++--------------------- src/gui/screensetup.h | 2 +- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/src/gui/screensetup.cpp b/src/gui/screensetup.cpp index e3fb9095f..7f0ac97db 100644 --- a/src/gui/screensetup.cpp +++ b/src/gui/screensetup.cpp @@ -152,15 +152,7 @@ int CScreenSetup::exec(CMenuTarget* parent, const std::string &) frameBuffer->paintBoxRel(x_box, y_box + BoxHeight, BoxWidth, BoxHeight, (selected ==1 )?COL_MENUCONTENTSELECTED_PLUS_0:COL_MENUCONTENT_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x_box + 30, y_box + BoxHeight, BoxWidth, - g_Locale->getText(LOCALE_SCREENSETUP_UPPERLEFT), - (selected == 0)?COL_MENUCONTENTSELECTED:COL_MENUCONTENT, 0, true); - - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x_box + 30, y_box + BoxHeight * 2, BoxWidth, - g_Locale->getText(LOCALE_SCREENSETUP_LOWERRIGHT), - (selected == 1)?COL_MENUCONTENTSELECTED:COL_MENUCONTENT, 0, true); - - paintIcons(); + paintIcons(selected); break; } case CRCInput::RC_up: @@ -258,18 +250,18 @@ void CScreenSetup::unpaintBorder(int pselected) frameBuffer->paintBoxRel(cx, cy, 96, 96, make16color(0xA0A0A0)); } -void CScreenSetup::paintIcons() +void CScreenSetup::paintIcons(int pselected) { - int icol_w, icol_h; + int icol_w = 0, icol_h = 0; frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_RED, &icol_w, &icol_h); frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_RED, x_box + 5, y_box, BoxHeight); frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_GREEN, x_box + 5, y_box+BoxHeight, BoxHeight); g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x_box + icol_w + 10, y_box + BoxHeight, BoxWidth, - g_Locale->getText(LOCALE_SCREENSETUP_UPPERLEFT ), COL_MENUCONTENTSELECTED , 0, true); // UTF-8 + g_Locale->getText(LOCALE_SCREENSETUP_UPPERLEFT ), (pselected == 0) ? COL_MENUCONTENTSELECTED:COL_MENUCONTENT , 0, true); // UTF-8 g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x_box + icol_w + 10, y_box + BoxHeight * 2, BoxWidth, - g_Locale->getText(LOCALE_SCREENSETUP_LOWERRIGHT), COL_MENUCONTENT, 0, true); // UTF-8 + g_Locale->getText(LOCALE_SCREENSETUP_LOWERRIGHT), (pselected == 1) ? COL_MENUCONTENTSELECTED:COL_MENUCONTENT, 0, true); // UTF-8 } void CScreenSetup::paintBorderUL() @@ -331,14 +323,7 @@ void CScreenSetup::paint() frameBuffer->paintBoxRel(x_box, y_box, BoxWidth, BoxHeight, COL_MENUCONTENTSELECTED_PLUS_0); //upper selected box frameBuffer->paintBoxRel(x_box, y_box + BoxHeight, BoxWidth, BoxHeight, COL_MENUCONTENT_PLUS_0); //lower selected box -#if 0 - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x_box + 30, y_box + BoxHeight, BoxWidth, - g_Locale->getText(LOCALE_SCREENSETUP_UPPERLEFT ), COL_MENUCONTENTSELECTED , 0, true); // UTF-8 - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x_box + 30, y_box + BoxHeight * 2, BoxWidth, - g_Locale->getText(LOCALE_SCREENSETUP_LOWERRIGHT), COL_MENUCONTENT, 0, true); // UTF-8 -#endif - - paintIcons(); + paintIcons(0); paintBorderUL(); paintBorderLR(); paintCoords(); diff --git a/src/gui/screensetup.h b/src/gui/screensetup.h index a8572ca88..1a3d2f429 100644 --- a/src/gui/screensetup.h +++ b/src/gui/screensetup.h @@ -58,7 +58,7 @@ class CScreenSetup : public CMenuTarget void paintCoords(); void paintBorder(int selected); void unpaintBorder(int selected); - void paintIcons(); + void paintIcons(int pselected); public: CScreenSetup();