diff --git a/src/gui/test_menu.cpp b/src/gui/test_menu.cpp index 2eb8e2aa8..9ffd75917 100644 --- a/src/gui/test_menu.cpp +++ b/src/gui/test_menu.cpp @@ -73,6 +73,7 @@ CTestMenu::CTestMenu() window = NULL; button = NULL; clock = clock_r = NULL; + text_ext = NULL; } CTestMenu::~CTestMenu() @@ -90,6 +91,7 @@ CTestMenu::~CTestMenu() delete clock; delete clock_r; delete chnl_pic; + delete text_ext; } static int test_pos[4] = { 130, 192, 282, 360 }; @@ -465,8 +467,22 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey) txt->paint(); return res; } + else if (actionKey == "text_ext"){ + if (text_ext == NULL) + text_ext = new CComponentsExtTextForm(); + text_ext->setDimensionsAll(10, 20, 300, 48); + text_ext->setLabelAndText("Label", "Text for demo", g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]); + text_ext->setFrameThickness(2); +// text_ext->setLabelWidthPercent(15/*%*/); + + if (text_ext->isPainted()) + text_ext->hide(); + else + text_ext->paint(); + return res; + } else if (actionKey == "header"){ - int hh = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); + int hh = 30;//g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); if (header == NULL){ header = new CComponentsHeader (100, 50, 500, hh, "Test-Header"/*, NEUTRINO_ICON_INFO, CComponentsHeader::CC_BTN_HELP | CComponentsHeader::CC_BTN_EXIT | CComponentsHeader::CC_BTN_MENU*/); // header->addHeaderButton(NEUTRINO_ICON_BUTTON_RED); @@ -680,6 +696,7 @@ void CTestMenu::showCCTests(CMenuWidget *widget) widget->addItem(new CMenuForwarderNonLocalized("Footer", true, NULL, this, "footer")); widget->addItem(new CMenuForwarderNonLocalized("Icon-Form", true, NULL, this, "iconform")); widget->addItem(new CMenuForwarderNonLocalized("Window", true, NULL, this, "window")); + widget->addItem(new CMenuForwarderNonLocalized("Text-Extended", true, NULL, this, "text_ext")); } void CTestMenu::showHWTests(CMenuWidget *widget) diff --git a/src/gui/test_menu.h b/src/gui/test_menu.h index b77bd9294..10869fe83 100644 --- a/src/gui/test_menu.h +++ b/src/gui/test_menu.h @@ -52,6 +52,7 @@ class CTestMenu : public CMenuTarget CComponentsButton *button; CComponentsFrmClock *clock ,*clock_r; CComponentsChannelLogo* chnl_pic; + CComponentsExtTextForm* text_ext; int width, selected; int showTestMenu();