summaryrefslogtreecommitdiffstats
path: root/tests/test_mailsync.cpp
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-08 10:56:58 +0200
committerDanilo M. <danix@danix.xyz>2026-08-10 08:23:25 +0200
commit10ff78629b3d60810b85110a2f194e0d1b87752a (patch)
treeb6850828478daa42efee7e66a544955e776ee28d /tests/test_mailsync.cpp
parent98250d51021aee8929d9f5084a440647c43132b0 (diff)
downloadqtmaildir-10ff78629b3d60810b85110a2f194e0d1b87752a.tar.gz
qtmaildir-10ff78629b3d60810b85110a2f194e0d1b87752a.zip
fix(ui): make the expander visible and the reply indent readable
Both were reported from the running application after the previous commit claimed them working, and the tests that passed could not see either fault. The expander took four attempts, each of which looked right in code: - QTreeView::drawBranches is the documented hook and does not work here. It runs BEFORE the row's cells, so with the expander on a content column the delegate's own background paints over it. A 60-pixel triangle survived as 8, indistinguishable from the theme's near-invisible dot. - Sizing the glyph from the row rather than the branch rect put most of it outside that rect. - Moving it into SubjectDelegate but calling it from only the no-chip branch left every real row without one, since every real row has an account chip and takes the other branch. It is now drawn by the delegate, which owns the cell and paints after the background, from both branches, with setRootIsDecorated(false) so the style does not draw its dot underneath. The indent was 20px and invisible for a reason the geometry could not show: a thread row draws an account chip before its subject and a reply row does not, so a reply's text already starts about a chip's width LEFT of its thread's. The indent has to beat that before any nesting reads at all, hence 72px. The indent test asserted on visualRect, which was correctly indented the whole time, and so passed against a build with no visible nesting. It now measures where the TEXT lands, accounting for the chip, and fails at 20px. The new expander test counts painted pixels of the glyph colour against a control row with no replies, and fails when the call is dropped from either branch.
Diffstat (limited to 'tests/test_mailsync.cpp')
0 files changed, 0 insertions, 0 deletions