mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
CComponentsInfoBox: Use setTextFont() in paintText()
This commit is contained in:
@@ -364,27 +364,25 @@ void CComponentsInfoBox::paintText()
|
|||||||
box->iHeight = height-2*fr_thickness;
|
box->iHeight = height-2*fr_thickness;
|
||||||
|
|
||||||
//init textbox
|
//init textbox
|
||||||
if (textbox == NULL)
|
if (textbox == NULL) {
|
||||||
textbox = new CTextBox(text, font, text_mode, box, col_body);
|
textbox = new CTextBox(text, font, text_mode, box, col_body);
|
||||||
|
textbox->setTextBorderWidth(0);
|
||||||
|
textbox->enableBackgroundPaint(false);
|
||||||
|
}
|
||||||
|
|
||||||
//set properties
|
//set properties
|
||||||
textbox->setTextBorderWidth(0);
|
textbox->setTextFont(font);
|
||||||
textbox->movePosition(box->iX, box->iY);
|
textbox->movePosition(box->iX, box->iY);
|
||||||
textbox->setTextColor(col_text);
|
textbox->setTextColor(col_text);
|
||||||
textbox->enableBackgroundPaint(false);
|
|
||||||
|
|
||||||
//set text
|
//set text
|
||||||
// string new_text = static_cast <string> (text);
|
string new_text = static_cast <string> (text);
|
||||||
// if (textbox->setText(&text))
|
if (textbox->setText(&new_text))
|
||||||
textbox->paint();
|
textbox->paint();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsInfoBox::paint(bool do_save_bg)
|
void CComponentsInfoBox::paint(bool do_save_bg)
|
||||||
{
|
{
|
||||||
if (textbox) {
|
|
||||||
delete textbox;
|
|
||||||
textbox = NULL;
|
|
||||||
}
|
|
||||||
paintInit(do_save_bg);
|
paintInit(do_save_bg);
|
||||||
paintPicture();
|
paintPicture();
|
||||||
if (text)
|
if (text)
|
||||||
|
Reference in New Issue
Block a user