Skip to content
  • Andrey Yashkin's avatar
    Fix an incorrect text bounding rectangle calculation inside the sidebar · 5099b615
    Andrey Yashkin authored and Albert Astals Cid's avatar Albert Astals Cid committed
    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
    5099b615