mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
*CTextBox: add optional text align TOP
This commit is contained in:
@@ -507,8 +507,8 @@ void CTextBox::refreshText(void)
|
|||||||
int i;
|
int i;
|
||||||
int x_center = 0;
|
int x_center = 0;
|
||||||
|
|
||||||
// set text y position depends of lines count
|
// set text y position
|
||||||
if (m_nNrOfLines > 1)
|
if (m_nMode & TOP)
|
||||||
// move to top of frame
|
// move to top of frame
|
||||||
y += m_nFontTextHeight + ((m_cFrameTextRel.iHeight - m_nFontTextHeight * m_nLinesPerPage) >> 1) - text_border_width;
|
y += m_nFontTextHeight + ((m_cFrameTextRel.iHeight - m_nFontTextHeight * m_nLinesPerPage) >> 1) - text_border_width;
|
||||||
else
|
else
|
||||||
|
@@ -94,6 +94,7 @@ class CTextBox
|
|||||||
SCROLL = 0x04, //frame box contains scrollbars on long text
|
SCROLL = 0x04, //frame box contains scrollbars on long text
|
||||||
CENTER = 0x40, //paint text centered
|
CENTER = 0x40, //paint text centered
|
||||||
RIGHT = 0x100, //paint text right
|
RIGHT = 0x100, //paint text right
|
||||||
|
TOP = 0x200, //paint text on top of frame
|
||||||
NO_AUTO_LINEBREAK = 0x80 //paint text without auto linebreak, cutting text
|
NO_AUTO_LINEBREAK = 0x80 //paint text without auto linebreak, cutting text
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user