* CTextBox: rename setFontTextHeight() => getFontTextHeight()

This commit is contained in:
Michael Liebmann
2013-05-01 07:56:30 +02:00
committed by Thilo Graf
parent 1fb105b361
commit 2c740f1db8
2 changed files with 6 additions and 6 deletions

View File

@@ -98,7 +98,7 @@ CTextBox::CTextBox(const char * text, Font* font_text, const int pmode,
//TRACE(" CTextBox::m_cText: %d, m_nMode %d\t\r\n",m_cText.size(),m_nMode); //TRACE(" CTextBox::m_cText: %d, m_nMode %d\t\r\n",m_cText.size(),m_nMode);
m_textBackgroundColor = textBackgroundColor; m_textBackgroundColor = textBackgroundColor;
m_nFontTextHeight = setFontTextHeight(); m_nFontTextHeight = getFontTextHeight();
//TRACE("[CTextBox] %s Line %d\r\n", __FUNCTION__, __LINE__); //TRACE("[CTextBox] %s Line %d\r\n", __FUNCTION__, __LINE__);
//TRACE(" CTextBox::m_nFontTextHeight: %d\t\r\n",m_nFontTextHeight); //TRACE(" CTextBox::m_nFontTextHeight: %d\t\r\n",m_nFontTextHeight);
@@ -152,7 +152,7 @@ void CTextBox::initVar(void)
m_FontUseDigitHeight = false; m_FontUseDigitHeight = false;
m_pcFontText = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]; m_pcFontText = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1];
m_nFontTextHeight = setFontTextHeight(); m_nFontTextHeight = getFontTextHeight();
m_nMaxTextWidth = 0; m_nMaxTextWidth = 0;
m_nNrOfPages = 1; m_nNrOfPages = 1;
@@ -191,7 +191,7 @@ void CTextBox::initFramesAndTextArray()
refreshTextLineArray(); refreshTextLineArray();
} }
int CTextBox::setFontTextHeight() int CTextBox::getFontTextHeight()
{ {
if (m_FontUseDigitHeight) if (m_FontUseDigitHeight)
return m_pcFontText->getDigitHeight() + (m_pcFontText->getDigitOffset() * 18) / 10; return m_pcFontText->getDigitHeight() + (m_pcFontText->getDigitOffset() * 18) / 10;
@@ -203,7 +203,7 @@ void CTextBox::setFontUseDigitHeight(bool set/*=true*/)
{ {
if (m_FontUseDigitHeight != set) { if (m_FontUseDigitHeight != set) {
m_FontUseDigitHeight = set; m_FontUseDigitHeight = set;
m_nFontTextHeight = setFontTextHeight(); m_nFontTextHeight = getFontTextHeight();
initFramesAndTextArray(); initFramesAndTextArray();
} }
} }
@@ -212,7 +212,7 @@ void CTextBox::setTextFont(Font* font_text)
{ {
if ((m_pcFontText != font_text) && (font_text != NULL)) { if ((m_pcFontText != font_text) && (font_text != NULL)) {
m_pcFontText = font_text; m_pcFontText = font_text;
m_nFontTextHeight = setFontTextHeight(); m_nFontTextHeight = getFontTextHeight();
//Initialise the window frames first and than refresh text line array //Initialise the window frames first and than refresh text line array
initFramesAndTextArray(); initFramesAndTextArray();
} }

View File

@@ -109,7 +109,7 @@ class CTextBox
void refreshText(void); void refreshText(void);
void reSizeMainFrameWidth(int maxTextWidth); void reSizeMainFrameWidth(int maxTextWidth);
void reSizeMainFrameHeight(int maxTextHeight); void reSizeMainFrameHeight(int maxTextHeight);
int setFontTextHeight(); int getFontTextHeight();
/* Variables */ /* Variables */
std::string m_cText; std::string m_cText;