Skip to content

refactor(settings)!: draw default themes in macOS system colors - #3395

Merged
datlechin merged 2 commits into
mainfrom
refactor/theme-native-rewrite
Oct 13, 2026
Merged

datlechin merged 2 commits into
mainfrom
refactor/theme-native-rewrite

Conversation

@datlechin

@datlechin datlechin commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Why

After #2791 the app stopped looking like macOS. A wrapper recolored the text in every content pane, the default themes used fixed hex for the editor and status colors, the grid painted its selection as a 28% wash under white text, and baked colors ignored Accent, Highlight and Increase Contrast. Every theme had to declare all 43 slots, so "default = native" could not be expressed.

Change

  • Default Light and Default Dark draw the editor and grid in system colors, with Xcode's default syntax colors and its high-contrast set under Increase Contrast.
  • A theme colors only code views and the data grid. Every slot is optional (theme format 3); a missing one draws the system color.
  • Other panes are back on system colors. The grid uses AppKit's own selection, header and separator colors.
  • Settings > Appearance: Light and Dark theme pickers, a Custom Themes list and an edit sheet.
  • A custom theme is saved to, renamed in and deleted from its own file, and a file changed on disk is never overwritten.

Verified

Source-scan guards fail on any theme read, literal color or hidden pane background outside the allowed files. A default-theme selected row matches a stock NSTableRowView pixel for pixel. A UI test drives create, rename, reset and delete.

Screenshots

Before After
Light Before light After light
Dark Before dark After dark
Settings Before settings After settings

Dracula colors only the editor and the grid: After Dracula

Not in this PR

  • Integer literals in the live editor take the string color, before and after this change; TreeSitterClient.quickHighlight colors them as numbers.
  • The UI test defaults domain outlives a test: UITestCase clears it from inside the runner's sandbox container, so it never reaches the app's com.TablePro.uitest suite.
  • Docs: docs(customization): document native default themes and theme scope docs#14, merge after this.

@datlechin
datlechin merged commit 8f12cdc into main Oct 13, 2026
8 of 12 checks passed
@datlechin
datlechin deleted the refactor/theme-native-rewrite branch October 13, 2026 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant