From 261094d227b68dd744c5cc6ca3c7c702873a98fc Mon Sep 17 00:00:00 2001 From: seife Date: Sat, 5 Nov 2011 11:36:30 +0000 Subject: [PATCH] neutrino/hintbox: too long texts could exceed screen space git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1819 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/widget/hintbox.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/widget/hintbox.cpp b/src/gui/widget/hintbox.cpp index a83d41b59..4a7a574a8 100644 --- a/src/gui/widget/hintbox.cpp +++ b/src/gui/widget/hintbox.cpp @@ -122,6 +122,11 @@ void CHintBox::init(const char * const Caption, const char * const Text, const i if (nw > width) width = nw; } + + /* make sure we don't overflow the usable area */ + if (nw > (int)CFrameBuffer::getInstance()->getScreenWidth()) + width = CFrameBuffer::getInstance()->getScreenWidth(); + window = NULL; }