From cc2b341754060f9f90304f211285876a316dbf92 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Fri, 2 Oct 2026 09:37:15 +0200 Subject: [PATCH] Make org links in headline titles clickable Headline titles were rendered as plain text, so an inline org link in a heading showed its raw [[target][desc]] syntax and could not be followed. Body text and list items already route links through renderInline and onLinkActivated; apply the same treatment to the title Label. The title now renders as StyledText via renderInline, exposes a pointer cursor over links through a HoverHandler, and dispatches clicks to openLink (which resolves and navigates via the model). Non-link text keeps its done-aware color and strike-through. --- ui/qml/OutlineView.qml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ui/qml/OutlineView.qml b/ui/qml/OutlineView.qml index f59b789..6062780 100644 --- a/ui/qml/OutlineView.qml +++ b/ui/qml/OutlineView.qml @@ -361,14 +361,24 @@ ListView { font.bold: true } - // Title + // Title. Rendered as StyledText so inline org links in the + // headline are clickable; non-link text keeps the done-aware + // color and strike-through. Label { - text: del.model.title ?? "" + text: outline.renderInline(del.model.title ?? "") color: (del.model.isDone ?? false) ? theme.placeholderTextColor : theme.textColor + linkColor: theme.linkColor font.pointSize: outline.levelFontSize(del.sectionLevel) font.strikeout: del.model.isDone ?? false elide: Text.ElideRight Layout.fillWidth: true + textFormat: Text.StyledText + onLinkActivated: (link) => outline.openLink(link) + + HoverHandler { + enabled: parent.hoveredLink !== "" + cursorShape: Qt.PointingHandCursor + } } // Scheduled timestamp