mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +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)
Origin commit data
------------------
Branch: ni/coolstream
Commit: b04ab099b2
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-07-18 (Wed, 18 Jul 2012)
------------------
This commit was generated by Migit
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)
|
||||
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;
|
||||
|
||||
m_window = NULL;
|
||||
|
Reference in New Issue
Block a user