From e2971e538e6bbdcf373524ed3ef6341860d8ab3d Mon Sep 17 00:00:00 2001 From: Randy Heydon Date: Thu, 19 Jun 2025 15:29:05 -0400 Subject: [PATCH] agenda: Change clockinfo title truncation to preserve images. The previous commit to remove truncation caused long titles that were not well handled by some clocks. This commit instead uses truncation based on string wrapping, which maintains limited-length titles, but now preserves images (e.g. emojis) embedded in the titles. --- apps/agenda/ChangeLog | 2 +- apps/agenda/agenda.clkinfo.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/agenda/ChangeLog b/apps/agenda/ChangeLog index ebbbbebb8..4d2e28096 100644 --- a/apps/agenda/ChangeLog +++ b/apps/agenda/ChangeLog @@ -18,4 +18,4 @@ 0.16: Correct date for all day events in negative timezones, improve locale display 0.17: Fixed "Today" and "Tomorrow" labels displaying in non-current weeks 0.18: Correct date in clockinfo for all-day events in negative timezones -0.19: Show full title in clockinfo instead of truncated +0.19: Change clockinfo title truncation to preserve images diff --git a/apps/agenda/agenda.clkinfo.js b/apps/agenda/agenda.clkinfo.js index a9e371bff..07c48e751 100644 --- a/apps/agenda/agenda.clkinfo.js +++ b/apps/agenda/agenda.clkinfo.js @@ -64,7 +64,7 @@ agenda.forEach((entry, i) => { - var title = entry.title; + var title = g.setFont("6x8").wrapString(entry.title,100)[0]; // All day events are always in UTC and always start at 00:00:00, so we // need to "undo" the timezone offsetting to make sure that the day is // correct.