From 7d5a6e00aa0be3a7dd3de2231070e713cab4040f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 28 Jul 2011 10:40:29 -0600 Subject: [PATCH] ... --- src/calibre/gui2/pictureflow/pictureflow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/calibre/gui2/pictureflow/pictureflow.cpp b/src/calibre/gui2/pictureflow/pictureflow.cpp index d00887a815..b82747841c 100644 --- a/src/calibre/gui2/pictureflow/pictureflow.cpp +++ b/src/calibre/gui2/pictureflow/pictureflow.cpp @@ -681,6 +681,10 @@ void PictureFlowPrivate::render_text(QPainter *painter, int index) { // So that if there is no subtitle, the caption is not flush with the bottom if (brect2.height() < fontSize) brect2.setHeight(fontSize); + // So that the text does not occupy more than the lower half of the buffer + if (brect.height() > ((int)(buffer.height()/3.0)) - fontSize*2) + brect.setHeight(((int)buffer.height()/3.0) - fontSize*2); + brect.moveTop(buffer_height - (brect.height() + brect2.height())); //printf("top: %d, height: %d\n", brect.top(), brect.height()); //