D23012: Fix an incorrect text bounding rectangle calculation inside the sidebar
Andrey Yashkin
noreply at phabricator.kde.org
Wed Aug 7 22:31:21 BST 2019
AndreyYashkin created this revision.
AndreyYashkin added a reviewer: Okular.
AndreyYashkin added a project: Okular.
AndreyYashkin requested review of this revision.
REVISION SUMMARY
Now //fontBoundaries// always has smaller width than //boundingRect// from
void QPainter::drawText(const QRect &rectangle, int flags, const QString &text, QRect *boundingRect = nullptr)
which is required to enclose the whole text. The difference is only several pixels, but sometimes it can cause visual problems. You can see the sidebar without and with this patch in Russian language with Noto Sans 10pt font on a picture below.
F7177644: изображение.png <https://phabricator.kde.org/F7177644>
Now the first and the last symbols are fully visible.
REPOSITORY
R223 Okular
REVISION DETAIL
https://phabricator.kde.org/D23012
AFFECTED FILES
ui/sidebar.cpp
To: AndreyYashkin, #okular
Cc: okular-devel, maguirre, fbampaloukas, joaonetto, kezik, tfella, ngraham, darcyshen, aacid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20190807/a27b0838/attachment-0001.html>
More information about the Okular-devel
mailing list