mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 07:51:19 +02:00
gui/osd_setup.cpp: lets just hide menu and repaint on corners option change
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user