mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
CTestMenu: fix blink of extended text sample
This commit is contained in:
@@ -560,7 +560,7 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
|||||||
else if (actionKey == "text_ext"){
|
else if (actionKey == "text_ext"){
|
||||||
if (text_ext == NULL)
|
if (text_ext == NULL)
|
||||||
text_ext = new CComponentsExtTextForm();
|
text_ext = new CComponentsExtTextForm();
|
||||||
text_ext->setDimensionsAll(10, 20, 300, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight());
|
text_ext->setDimensionsAll(10, 20, 300, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight()+2*2);
|
||||||
text_ext->setLabelAndText("Label", "Text for demo", g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]);
|
text_ext->setLabelAndText("Label", "Text for demo", g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]);
|
||||||
text_ext->setFrameThickness(2);
|
text_ext->setFrameThickness(2);
|
||||||
// text_ext->setLabelWidthPercent(15/*%*/);
|
// text_ext->setLabelWidthPercent(15/*%*/);
|
||||||
@@ -577,15 +577,12 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
|||||||
text_ext->setDimensionsAll(10, 20, 300, 48);
|
text_ext->setDimensionsAll(10, 20, 300, 48);
|
||||||
text_ext->setLabelAndText("Label", "Text for demo", g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]);
|
text_ext->setLabelAndText("Label", "Text for demo", g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]);
|
||||||
text_ext->setFrameThickness(2);
|
text_ext->setFrameThickness(2);
|
||||||
// text_ext->setLabelWidthPercent(15/*%*/);
|
|
||||||
text_ext->paint0();
|
|
||||||
static_cast<CComponentsText*>(text_ext->getCCItem(1))->kill();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (static_cast<CComponentsText*>(text_ext->getCCItem(1))-> paintBlink(500000, true)){
|
if (text_ext->paintBlink(500000, true)){
|
||||||
ShowHint("Testmenu: Blink","Testmenu: Blinking extended text is running ...", 700, 10);
|
ShowHint("Testmenu: Blink","Testmenu: Blinking extended text is running ...", 700, 10);
|
||||||
}
|
}
|
||||||
if (text_ext->getTextObject()->cancelBlink()){
|
if (text_ext->cancelBlink()){
|
||||||
ShowHint("Testmenu: Blink","Testmenu: Blinking extended text stopped ...", 700, 2);
|
ShowHint("Testmenu: Blink","Testmenu: Blinking extended text stopped ...", 700, 2);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
Reference in New Issue
Block a user