D18735: Improve built-in line/box characters drawing
Fabian Vogt
noreply at phabricator.kde.org
Wed Feb 6 19:18:20 GMT 2019
fvogt requested changes to this revision.
fvogt added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> LineBlockCharacters.cpp:171
> + return value << amount | value >> (sizeof(value) * 8 - amount);
> +};
> +
Stray ';' - results in compiler warning.
> LineBlockCharacters.cpp:193
> +
> + const qreal lightWidth = qRound(qMax(fontWidth * LightWidthToFontSizeRatio * boldCoeff, 1.0));
> + const qreal heavyHalfExtraWidth = qRound(qMax(lightWidth * HeavyHalfExtraToLightRatio, 1.0));
For `fontWidth` less than 8 this returns 1 for both bold and normal lines. Intentional?
IMO increasing the `LightWidthToFontSizeRatio` to `1/5` is acceptable.
> LineBlockCharacters.h:62
> + */
> + inline void draw(QPainter &paint, const QRect &cellRect, const QChar &chr, bool bold) {
> + draw(paint, cellRect.x(), cellRect.y(), cellRect.width(), cellRect.height(), chr, bold);
AFAICT only this variant is actually used - so is the other one necessary at all?
REPOSITORY
R319 Konsole
REVISION DETAIL
https://phabricator.kde.org/D18735
To: mglb, #konsole, #vdg, fvogt
Cc: fvogt, konsole-devel, maciejn, thsurrel, ngraham, maximilianocuria, hindenburg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20190206/d5244c0e/attachment-0001.html>
More information about the konsole-devel
mailing list