CComponentsInfoBox: Use setTextFont() in paintText()

This commit is contained in:
micha-bbg
2012-08-20 21:17:09 +02:00
committed by Thilo Graf
parent ff12f2b5b5
commit e233c7467e

View File

@@ -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)