From bfdc3ce1e1be950dc810d19490d0b0a8ccaea3e8 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 13 Nov 2026 09:35:54 +0100 Subject: feat(calendar): end time follows the start, default length setting Moving an event's start now moves its end by the island's default event length, whether the start is typed, wheeled or picked, rolling into the next day past midnight. A multi-day timed event keeps its end, since snapping it to the start's day would drop the other days. Typing follows on every edit that normalises to a valid time, so Save without leaving the field still sees the moved end. A new event gets the same length. The length lives in Prefs as island.eventMinutes (5 to 1440, default 60) and is set on a new Island bar group in the settings window, which the island's other settings will join. Co-Authored-By: Claude Opus 5.5 --- desktop/Prefs.qml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'desktop/Prefs.qml') diff --git a/desktop/Prefs.qml b/desktop/Prefs.qml index ef2ac72..0861258 100644 --- a/desktop/Prefs.qml +++ b/desktop/Prefs.qml @@ -84,6 +84,15 @@ Singleton { root.write(Object.assign({}, root.doc, { bootlogo: root.bootlogo })); } + // The island bar's settings (modules/island): the length a new event gets, + // and that its end keeps from the start, in minutes. + readonly property var islandDefaults: ({ eventMinutes: 60 }) + property var island: islandDefaults + function setIsland(changes) { + root.island = Object.assign({}, root.island, changes); + root.write(Object.assign({}, root.doc, { island: root.island })); + } + // The whole parsed object, so a write keeps keys this version does not // know about. property var doc: ({}) @@ -154,6 +163,11 @@ Singleton { const bl = parsed.bootlogo && typeof parsed.bootlogo === "object" && !Array.isArray(parsed.bootlogo) ? parsed.bootlogo : {}; root.bootlogo = Object.assign({}, root.bootlogoDefaults, bl); + const isl = parsed.island && typeof parsed.island === "object" ? parsed.island : {}; + root.island = { + eventMinutes: Number.isInteger(isl.eventMinutes) && isl.eventMinutes >= 5 && isl.eventMinutes <= 1440 + ? isl.eventMinutes : 60, + }; } FileView { -- cgit v1.2.3