aboutsummaryrefslogtreecommitdiffstats
path: root/src/carddelegate.h
AgeCommit message (Collapse)AuthorFilesLines
2026-08-10feat(view): lift a muted account colour for the accent barDanilo M.1-12/+19
The five real account colours are all mid-tone, because they were chosen as CHIP fills with legible text on top, and three pixels of a mid-tone colour barely registers beside a card's own background. The bar now lifts saturation and lightness to a floor. A floor, not a repaint: a colour already past it is returned untouched, so a deliberately vivid choice is preserved and only the muted ones move. Hue is never altered, because hue is the entire information the bar carries and a shifted one would stop matching the account's chip and its dropdown swatch. 0.65 and 0.50 were chosen by rendering all five accounts as 3px bars against both a dark and a light card background and looking at them. Higher pushed the weakest of them, a green at S 0.33, toward a neon that no longer matched its own chip; lower left it where it started. accentLineColour had no test at all until now, which is how two earlier versions of it shipped wrong: one blended toward Base until it WAS the background, the other passed a chip colour through unchanged. test_carddelegate covers the lift, the floor's idempotence, hue preservation across all five accounts, and the fallback for a thread with no account tag.
2026-08-10fix(view): stop clipping the date, and make the accent bar visibleDanilo M.1-11/+15
Both found by rendering real cards to an image and looking at them, not by any assertion. The suite was green through both. The date lost the leading digit of its year on every UNREAD card. The layout reserves the date's width from the font it is handed, which is the view's regular font, while the delegate paints with the bold one the model supplies for unread: 154px reserved against 170px needed. CardLayout now measures the date bold whatever font it is given, so the reserved width cannot be narrower than what is drawn. A few pixels are wasted on a read card, which is the cheap side of the trade. The accent bar was painted correctly and was invisible. Blending the account colour 0.35 toward the palette's Base, as the plan specified, is a fraction OF THE ACCOUNT COLOUR, so on a dark theme it produced (0.18, 0.22, 0.26) against a Base of (0.169, 0.169, 0.169): the background. The blend is dropped entirely. An account colour is already chosen to be a chip's fill carrying legible text, so it is muted to begin with, and nothing is drawn on the bar that needs that contrast. The spine keeps a blend, at 0.55, because it runs the full height of every reply in an expansion and is a different problem from a 3px edge marker. The bar is still faint at 3px on a dark theme, since the account colours are chosen as chip fills. Whether kAccentWidth needs raising cannot be settled without the user's own accounts, screen and theme; that is Task 10's open question and it is left open.
2026-08-10feat(view): paint the whole card in one delegateDanilo M.1-0/+68
Replaces SubjectDelegate. The tag chips come home from the view: the strip was painted there only because a delegate cannot paint outside its column and the strip spanned all five, and with one column there is nothing to span. RowStyleDelegate is inherited rather than dropped. Its job survives the redesign: Qt resolves ForegroundRole into the palette's Text roles and prefers those over HighlightedText, so the read/unread dimming would win on a selected row and land as grey on the highlight. What it loses is the rest of its body, which aligned cells against a text band and centred two marker columns; both described a grid that no longer exists. A reply's Re: prefix is stripped here. Every reply repeating the thread's subject is the visual signature of a table of records, which is the thing item 53 is about. The account chip becomes a bar down the card's left edge, and the reply spines inherit its colour, so an expanded thread is bounded by one accent from its root to its last reply without a second line in the gutter. Neither uses the raw account colour: that colour is chosen to be a chip's fill with legible text on top, and the same value as a thin line has to be followable down an expansion without competing with the senders, so it is blended toward the palette's Base by the weight threadLineColour() already uses. A reply resolves its THREAD's colour by walking to the root, since AccountColourRole is empty on a message row and a neutral spine under an accented root would break the continuous edge. The build is red at this commit; the view and window still name the old delegate.