mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-13 05:20:00 -08:00
Fill the home buttons' outlined text with the winding rule
The Home tab buttons draw their label as a QPainterPath: a black stroke, then a white fill. Upstream #7539 (2026-11-04) moved the label from the stylesheet's sans-serif/Helvetica Neue to the theme's InterfaceDefault font, which on macOS is the system font, SF Pro. Its glyph outlines have overlapping contours, and QPainterPath fills with Qt::OddEvenFill by default, so every overlap stayed unfilled and showed the black stroke underneath as dark notches inside the letters. The same symptom was upstream issue 6490, fixed in January for the old font. Qt::WindingFill fills overlapping contours. Checked on macOS with Homebrew Qt 6.12: the notches are gone.
This commit is contained in:
parent
587c4b43c1
commit
9e98a6386d
1 changed files with 1 additions and 0 deletions
|
|
@ -118,6 +118,7 @@ void HomeStyledButton::paintEvent(QPaintEvent *event)
|
||||||
|
|
||||||
QPainterPath path;
|
QPainterPath path;
|
||||||
path.addText(center, font(), text());
|
path.addText(center, font(), text());
|
||||||
|
path.setFillRule(Qt::WindingFill);
|
||||||
|
|
||||||
QPen pen(Qt::black, 4.0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
|
QPen pen(Qt::black, 4.0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
|
||||||
painter.strokePath(path, pen);
|
painter.strokePath(path, pen);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue