mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 07:23:09 +02:00
hintboxext: fix for too long lines
text offset was calculated wrong if lines too long to fit on the screen were present, leading to all sorts of graphics corruptions (e.g. visible with the simple test.sh script from tuxbox wiki)
This commit is contained in:
@@ -191,6 +191,13 @@ void CHintBoxExt::init(const neutrino_locale_t Caption, const int Width, const c
|
|||||||
|
|
||||||
if (nw > m_width)
|
if (nw > m_width)
|
||||||
m_width = nw;
|
m_width = nw;
|
||||||
|
|
||||||
|
/* if the output does not fit, make sure we at least
|
||||||
|
* stay inside the screen... */
|
||||||
|
m_width = w_max(m_width ,SHADOW_OFFSET);
|
||||||
|
if (maxLineWidth + scrollWidth > m_width)
|
||||||
|
maxLineWidth = m_width - scrollWidth;
|
||||||
|
|
||||||
textStartX = (m_width - scrollWidth - maxLineWidth) / 2;
|
textStartX = (m_width - scrollWidth - maxLineWidth) / 2;
|
||||||
|
|
||||||
m_window = NULL;
|
m_window = NULL;
|
||||||
|
Reference in New Issue
Block a user