mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 07:23:09 +02:00
widget/hintbox.cpp: add explicit init of var picon
Had some issues while compile with gcc 7.x. Exact data type was expected.
This commit is contained in:
@@ -265,6 +265,9 @@ void CHintBox::addHintItem(const std::string& Text, const int& text_mode, const
|
|||||||
/* set required font and line height */
|
/* set required font and line height */
|
||||||
Font* item_font = !font_text ? hb_font : font_text;
|
Font* item_font = !font_text ? hb_font : font_text;
|
||||||
|
|
||||||
|
/* set picon */
|
||||||
|
string picon = Picon;
|
||||||
|
|
||||||
/* pre define required info height depends of lines and minimal needed height*/
|
/* pre define required info height depends of lines and minimal needed height*/
|
||||||
int line_breaks = CTextBox::getLines(Text);
|
int line_breaks = CTextBox::getLines(Text);
|
||||||
int h_font = item_font->getHeight();
|
int h_font = item_font->getHeight();
|
||||||
@@ -276,7 +279,7 @@ void CHintBox::addHintItem(const std::string& Text, const int& text_mode, const
|
|||||||
|
|
||||||
int txt_mode = text_mode;
|
int txt_mode = text_mode;
|
||||||
/* remove CENTER mode if picon defined */
|
/* remove CENTER mode if picon defined */
|
||||||
if (!Picon.empty() && (txt_mode & CTextBox::CENTER)){
|
if (!picon.empty() && (txt_mode & CTextBox::CENTER)){
|
||||||
txt_mode &= ~CTextBox::CENTER;
|
txt_mode &= ~CTextBox::CENTER;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -313,7 +316,7 @@ void CHintBox::addHintItem(const std::string& Text, const int& text_mode, const
|
|||||||
color_text);
|
color_text);
|
||||||
|
|
||||||
/* define picon and disable bg */
|
/* define picon and disable bg */
|
||||||
info_box->setPicture(Picon);
|
info_box->setPicture(picon);
|
||||||
info_box->doPaintBg(false);
|
info_box->doPaintBg(false);
|
||||||
|
|
||||||
/* recalculate new hintbox dimensions and position*/
|
/* recalculate new hintbox dimensions and position*/
|
||||||
|
Reference in New Issue
Block a user