aboutsummaryrefslogtreecommitdiffstats
path: root/src/types.h
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-10 08:32:36 +0200
committerDanilo M. <danix@danix.xyz>2026-08-10 08:32:36 +0200
commit497c56a962512949d606c26ae5159621b58a5e7b (patch)
tree186f0886486a10a4626a07d6080def8d1d02f063 /src/types.h
parentc56d826673ec1bbd821cf703e6ee12cbef1a7ffc (diff)
downloadqtmaildir-497c56a962512949d606c26ae5159621b58a5e7b.tar.gz
qtmaildir-497c56a962512949d606c26ae5159621b58a5e7b.zip
feat(view): compute a card's geometry with no painting
Split from the delegate deliberately. A delegate needs a live painter and an exposed view, which is what makes delegate tests fragile: viewport()->render() returns a blank image in several ordinary situations, and a probe reporting no ink is likelier broken than the code it tests. Every geometric claim about a card is made here, where a test is a function call. Three lines at a uniform height, so setUniformRowHeights(true) survives. Indent caps at depth 4 with qMin rather than a branch, so depth 5 and depth 50 land in the same place. The date is measured before the sender, so a long sender elides instead of painting over it. Two traps handled that a first pass gets wrong. QRect::right() is inclusive, so the right edge is carried as an exclusive one and everything sized from it lands where the padding constant says rather than a pixel short. And QFont::pointSizeF returns -1 for a font set in pixels, which qt6ct does, so smallFont branches on which unit the font actually carries instead of silently returning the card's own size.
Diffstat (limited to 'src/types.h')
0 files changed, 0 insertions, 0 deletions