Checked-task treatment knobs (strikethrough gate, label ink, checkbox tints) - #125
Draft
dylandeheer wants to merge 2 commits into
Draft
Checked-task treatment knobs (strikethrough gate, label ink, checkbox tints)#125dylandeheer wants to merge 2 commits into
dylandeheer wants to merge 2 commits into
Conversation
The theme can recolor every element except heading text (it inherits bodyText), and the heading config covers every metric except the face — so an embedder that wants serif display headings over a sans body has to fork. HeadingStyle.fontName picks a PostScript face for headings, honored exactly so the chosen weight survives; an unresolvable name falls back to the stock bold base font, like TaskCheckboxStyle's symbol fallback. MarkdownEditorTheme.headingText colors heading text while the `#` glyphs stay on headingMarker and inline constructs inside a heading keep their own ink. Emphasis inside a heading still composes on top of the configured face (traits added, family and per-level size kept). Both knobs default to nil, which keeps styling identical to before. Co-authored-by: Cursor <cursoragent@cursor.com>
…tints) Completed tasks were hardwired to a single look: label struck through in strikethroughColor, checkbox tinted bodyText checked / mutedText unchecked. Designs that mark completion by ink alone had no seam. TaskCheckboxStyle.strikethroughCompletedTasks gates the strikethrough (default on, as before). MarkdownEditorTheme.completedTaskText colors the checked label (nil = body ink; inline constructs append later and keep their own colors, the same layering headingText relies on). MarkdownEditorTheme.taskCheckboxChecked/-Unchecked tint the drawn symbols (nil = the historical defaults). Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Aug 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Completing a task always strikes the label through in body ink, and the drawn checkbox tints are fixed (
bodyTextchecked /mutedTextunchecked). Designs that mark completion by muting the label instead of striking it, or that tint the checked box in an accent color, can't be expressed.What's added
TaskCheckboxStyle.strikethroughCompletedTasks: Bool— gates the completed label's strikethrough. Defaulttrue, preserving today's rendering exactly.MarkdownEditorTheme.completedTaskText: NSColor?— foreground for a checked task's label.nil(the default) keeps body ink. Inline constructs inside the label (links, code, extension spans) keep their own colors, same layering as everywhere else.MarkdownEditorTheme.taskCheckboxChecked/taskCheckboxUnchecked: NSColor?— tints for the drawn checkbox symbol.nilkeeps the historicalbodyText/mutedText.Tests
Tests/MarkdownEngineTests/TaskStylingTests.swift(5 tests): strikethrough present by default and absent when gated off;completedTaskTextcolors checked labels only (unchecked untouched, inline constructs keep their ink); checkbox tint slots default to nil and carry custom inks.swift build/swift testgreen locally (the twoScrollingHeaderControlleranimation-timing failures are pre-existing/environmental).Notes
Stacks on #121 (branched from
feature/heading-font-and-color; the diff over #121 is this feature only).Made with Cursor