From 789221e790782ea61c873e89d312ca3ae40b6041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20Ker=C3=A4nen?= Date: Sun, 26 Jan 2014 16:24:15 +0200 Subject: [PATCH] UI|GL: Small adjustment to text line width compression --- doomsday/libappfw/src/gltextcomposer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doomsday/libappfw/src/gltextcomposer.cpp b/doomsday/libappfw/src/gltextcomposer.cpp index a6afbe16e8..2c7939e526 100644 --- a/doomsday/libappfw/src/gltextcomposer.cpp +++ b/doomsday/libappfw/src/gltextcomposer.cpp @@ -458,11 +458,12 @@ void GLTextComposer::makeVertices(Vertices &triStrip, */ Instance::Line::Segment &seg = line.segs.last(); - if(seg.right() > d->wraps->maximumWidth() + 1) + int const leeway = 3; + if(seg.right() > d->wraps->maximumWidth() + leeway) { // Needs compressing (up to 10%). seg.compressed = true; - seg.width = de::max(int(seg.width * .9f), d->wraps->maximumWidth() + 1 - seg.x); + seg.width = de::max(int(seg.width * .9f), d->wraps->maximumWidth() + leeway - seg.x); } }