From 5f31a037a37a928a8e21fdf0950568a689e29fb8 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 28 Aug 2026 11:44:06 +0200 Subject: refactor: remove the sibling chip tier Nothing is a sibling any more: a conversation row draws the thread's tags and a message row draws its own. --- src/cardlayout.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'src/cardlayout.cpp') diff --git a/src/cardlayout.cpp b/src/cardlayout.cpp index a9bbe52..ec22635 100644 --- a/src/cardlayout.cpp +++ b/src/cardlayout.cpp @@ -107,32 +107,6 @@ QFont CardLayout::smallFont(const QFont &cardFont) return small; } -QFont CardLayout::siblingFont(const QFont &cardFont) -{ - // A FRACTION of the card's font, not a fixed number of points off it. - // - // Subtracting one point was the first attempt and the user reported the - // tiers as indistinguishable. The reason is arithmetic: their desktop is - // 14pt, so the two chip tiers were 13 and 12, a 7% step. Subtraction gives - // a step whose size depends on the desktop font, which is exactly backwards - // — it is largest where the text is already small enough to be fragile. - // - // 0.70 of the card font, against smallFont()'s one point off, so on a 14pt - // desktop the tiers are 13 and 10. Chosen with the user against rendered - // sizes rather than picked. - constexpr qreal kSiblingScale = 0.70; - - QFont small = cardFont; - // pointSizeF() returns -1 for a font set in PIXELS, which qt6ct does, and - // scaling -1 asks for an invalid size that Qt silently ignores, leaving - // both tiers identical. Same split as smallFont(), same reason. - if (small.pointSizeF() > 0.0) - small.setPointSizeF(qMax(6.0, cardFont.pointSizeF() * kSiblingScale)); - else if (small.pixelSize() > 0) - small.setPixelSize(qMax(8, qRound(cardFont.pixelSize() * kSiblingScale))); - return small; -} - int CardLayout::heightFor(const QFont &font) { const QFontMetrics metrics(font); -- cgit v1.2.3