Skip to content
Commit 5099b615 authored by Andrey Yashkin's avatar Andrey Yashkin Committed by Albert Astals Cid
Browse files

Fix an incorrect text bounding rectangle calculation inside the sidebar

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}
Now the first and the last symbols are fully visible.

Reviewers: #okular

Subscribers: okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D23012
parent 7e2e5a4a
Pipeline #6340 passed with stage
in 16 minutes and 21 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment