aboutsummaryrefslogtreecommitdiffstats
path: root/src/cardlayout.cpp
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-28 11:44:06 +0200
committerDanilo M. <danix@danix.xyz>2026-08-28 11:44:06 +0200
commit5f31a037a37a928a8e21fdf0950568a689e29fb8 (patch)
tree644c9ce1b9117a28533e9f9c4cdf81c7289677cb /src/cardlayout.cpp
parent20eb3877c4502a0b8ebe770a563066d8c85387ba (diff)
downloadqtmaildir-5f31a037a37a928a8e21fdf0950568a689e29fb8.tar.gz
qtmaildir-5f31a037a37a928a8e21fdf0950568a689e29fb8.zip
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.
Diffstat (limited to 'src/cardlayout.cpp')
-rw-r--r--src/cardlayout.cpp26
1 files changed, 0 insertions, 26 deletions
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);