From 831f7bd8a61e0ee41fc9abec9dd1a8bc15d2e678 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 5 May 2014 22:28:09 +0200 Subject: [PATCH] CTestMenu: clean up, change some sample comments for footer init Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/7e6ce8acc69dd199c44640abb673e0cb58dd3729 Author: Thilo Graf Date: 2014-05-05 (Mon, 05 May 2014) --- src/gui/test_menu.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/test_menu.cpp b/src/gui/test_menu.cpp index 58564da82..f8f7031ef 100644 --- a/src/gui/test_menu.cpp +++ b/src/gui/test_menu.cpp @@ -379,7 +379,7 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey) button->paint(); }else button->hide(); - + return res; } else if (actionKey == "circle"){ @@ -545,15 +545,14 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey) if (footer == NULL){ footer = new CComponentsFooter (100, 30, 1000, hh, CComponentsFooter::CC_BTN_HELP | CComponentsFooter::CC_BTN_EXIT | CComponentsFooter::CC_BTN_MENU |CComponentsFooter::CC_BTN_MUTE_ZAP_ACTIVE, NULL, true); int start = 5, btnw =90, btnh = 37; - footer->showButtonContour(); footer->setButtonFont(g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]); footer->setIcon(NEUTRINO_ICON_INFO); //add button labels with conventional button label struct - footer->setButtonLabels(TestButtons, TestButtonsCount, 0, footer->getWidth()/10); + footer->setButtonLabels(TestButtons, TestButtonsCount, 0, footer->getWidth()/6); //also possible: use directly button name and as 2nd parameter string or locale as text -// footer->setButtonLabel(NEUTRINO_ICON_BUTTON_RED, "This is a button label text!", 0, 250); +// footer->setButtonLabel(NULL, "Test", 0, 250); //also possible: use Button objects // footer->addCCItem(new CComponentsButtonRed(start, 0, btnw, btnh, "Button1")); @@ -561,6 +560,7 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey) // footer->addCCItem(new CComponentsButtonYellow(start+=btnw, 0, btnw, btnh, "Button3")); // footer->addCCItem(new CComponentsButtonBlue(start+=btnw, 0, btnw, btnh, "Button4")); } + if (!footer->isPainted()) footer->paint(); else