• Andrey Yashkin's avatar
    Fix an incorrect text bounding rectangle calculation inside the sidebar · 5099b615
    Andrey Yashkin authored
    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
sidebar.cpp 24.8 KB