From e822d72af5805d96265524539e103e88ced6bcf7 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried 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 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/261094d227b68dd744c5cc6ca3c7c702873a98fc Author: Stefan Seyfried Date: 2011-11-05 (Sat, 05 Nov 2011) --- 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; }