From kde-commits Sat Feb 28 02:46:34 2009 From: Artur Duque de Souza Date: Sat, 28 Feb 2009 02:46:34 +0000 To: kde-commits Subject: KDE/kdebase/workspace/plasma/applets/pager Message-Id: <1235789194.559204.29434.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=123578920329100 SVN commit 933129 by asouza: For the default size of the panel we can allow this "one pixel" offset on the bottom. The applet is so small that you almost can't see the offset and this brings back the labels for the panel's default size. For bigger sizes it works perfectly. Anyway, a better solution is welcome ;) We don't like dealing with 'magical math'. BUG:184152 M +7 -2 pager.cpp --- trunk/KDE/kdebase/workspace/plasma/applets/pager/pager.cpp #933128:933129 @@ -1118,9 +1118,14 @@ QRectF target = m_rects[i]; //take also shadow position and radius into account //kDebug() << target << result.height(); - if (target.height() >= result.height() - radius * 2) { - QPointF paintPoint = target.center() - (result.rect().center() + QPoint(radius, radius)); + // for the default size of the panel we can allow this "one pixel" + // offset on the bottom. the applet is so small that you almost + // can't see the offset and this brings back the labels for the + // panel's default size. + if (target.height() + 1 >= result.height() - radius * 2) { + QPointF paintPoint = target.center() - (result.rect().center() + QPoint(radius, radius)); + if (paintPoint.x() + radius < target.x() + 1) { paintPoint.setX(target.x() + 1 - radius); }