From 965654aad82a88d32cdf526f54165eb2757f497c Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Mon, 9 Jul 2012 17:37:34 +0400 Subject: [PATCH] gui/osd_setup.cpp: lets just hide menu and repaint on corners option change Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/7ab08766116cf997ebe401bdb3114199eeeaedb1 Author: [CST] Focus Date: 2012-07-09 (Mon, 09 Jul 2012) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/osd_setup.cpp | 12 +++++++++--- src/gui/widget/menue.cpp | 3 ++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 8f912101c..73860b8b0 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -445,7 +445,8 @@ int COsdSetup::showOsdSetup() osd_menu->addItem(GenericMenuSeparatorLine); // corners - mc = new CMenuOptionChooser(LOCALE_EXTRA_ROUNDED_CORNERS, &g_settings.rounded_corners, MENU_CORNERSETTINGS_TYPE_OPTIONS, MENU_CORNERSETTINGS_TYPE_OPTION_COUNT, true, this); + int rounded_corners = g_settings.rounded_corners; + mc = new CMenuOptionChooser(LOCALE_EXTRA_ROUNDED_CORNERS, &rounded_corners, MENU_CORNERSETTINGS_TYPE_OPTIONS, MENU_CORNERSETTINGS_TYPE_OPTION_COUNT, true, this); mc->setHint("", LOCALE_MENU_HINT_ROUNDED_CORNERS); osd_menu->addItem(mc); @@ -776,8 +777,13 @@ bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data) g_InfoViewer->changePB(); return true; } - else if ((ARE_LOCALES_EQUAL(OptionName, LOCALE_EXTRA_VOLUME_POS)) || - (ARE_LOCALES_EQUAL(OptionName, LOCALE_EXTRA_ROUNDED_CORNERS))) { + else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_EXTRA_VOLUME_POS)) { + CVolume::getInstance()->Init(); + return false; + } + else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_EXTRA_ROUNDED_CORNERS)) { + osd_menu->hide(); + g_settings.rounded_corners = * (int*) data; CVolume::getInstance()->Init(); return true; } diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 7a523c184..01e3e3f2e 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -870,6 +870,7 @@ void CMenuWidget::paint() saveScreen(); #endif CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, nameString.c_str()); +#if 0 //clear backround on corners switch static bool corners = g_settings.rounded_corners; if(g_settings.rounded_corners != corners){ @@ -880,7 +881,7 @@ void CMenuWidget::paint() frameBuffer->paintBackgroundBoxRel(x, y, full_width, CORNER_RADIUS_LARGE-2+SHADOW_OFFSET); } } - +#endif //paint shadow and backround int rad = RADIUS_LARGE-2; frameBuffer->paintBoxRel(x+SHADOW_OFFSET ,y + SHADOW_OFFSET ,width + sb_width ,height + rad ,COL_MENUCONTENTDARK_PLUS_0 ,rad);