mail client (IMAP/SMTP)
git clone https://git.lucas.co/cce-mail.git
fix: the From line is drawn in full too
Same reasoning as the To line (b4698b9): an address is read end to end,
so the From line draws its whole text, bounded only by its clip rect.
The subject and Date keep their ellipsis.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
src/main.rs | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/main.rs b/src/main.rs
index f9332b2..0bdd807 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -4072,13 +4072,14 @@ impl ClearEmailApp {
plate_x + plate_w - pane_inner_pad(),
plate_y + plate_h,
]);
- // (text, y, size, color, ellipsized). The To line is drawn
- // in full — an address list is read end to end, and an
+ // (text, y, size, color, ellipsized). The address lines are
+ // drawn in full — an address is read end to end, and an
// ellipsis in the middle of one hides exactly the part that
- // tells recipients apart — so only its clip rect bounds it.
+ // tells senders and recipients apart — so only their clip
+ // rects bound them.
let header_lines: [(String, f32, f32, [u8; 3], bool); 4] = [
(email.subject.clone(), DETAIL_SUBJECT_Y, 15.0, [0xff, 0xff, 0xff], true),
- (format!("From: {}", email.from), DETAIL_FROM_Y, 11.0, [0xb0, 0xb0, 0xb8], true),
+ (format!("From: {}", email.from), DETAIL_FROM_Y, 11.0, [0xb0, 0xb0, 0xb8], false),
(format!("To: {}", email.to), DETAIL_TO_Y, 11.0, [0x83, 0x83, 0x8a], false),
(format!("Date: {}", email.date), DETAIL_DATE_Y, 11.0, [0x83, 0x83, 0x8a], true),
];