Skip to content

Native Light/Dark editor themes on Scintilla 3.7.6 #6

Open

Description

@itlezy

Implement native Light/Dark editor themes on the current Scintilla 3.7.6 baseline, preserving the small-maintenance fork approach.

The existing style renderer already controls text/background, margins, selection, caret, braces, current line, whitespace and folding. The existing Shift+F12 toggle switches only default styles; language token palettes remain shared. A complete theme must cover both.

Product direction:

  • Stay close to Notepad2-mod, preserving fast startup, responsive editing, small footprint, native controls and simple deployment.
  • Minimal, focused evolution. No migration to Notepad3/Notepad4 or adoption of their theme frameworks or feature stacks.
  • Use the existing native schemes/configuration and Scintilla 3.7.6. Avoid new dependencies and background work. Version or feature parity is not a goal.
  • Keep theme switching out of the per-character editing path. Assess affected startup, editing latency, memory and idle work against the current fork, recording measurements and limitations where relevant.

Acceptance criteria:

  • Switch between complete Light and Dark palettes across supported languages without changing the selected language, font preferences, file associations, document contents, selection or undo history.
  • Persist the selected theme. Repeated switches and restart produce predictable results.
  • Keep bookmarks and occurrence highlights readable; inventory remaining popup/editor colors outside Styles.c.
  • Invalid or partial theme input must not leave a mixed live palette.
  • Validate Release/Debug x86/x64, representative lexer samples, selection/brace/highlight readability and restart persistence.

Scope is editor-only: text/background, syntax colors, margins, selection, caret, braces, current line, whitespace, folding, bookmarks and occurrence highlights. Application chrome (menus, dialogs, toolbar, status bar, title bar and scrollbars) is out of scope, not a planned follow-up. Completing editor themes completes this appearance milestone.

Reference investigation (source inspection only, no imported or runtime-tested code):

  • None of the five candidate backlog forks (antiufo, johnwait, mercury233, tnotstar, waskosky) showed dark-mode hooks or a dedicated dark implementation in the checked default-branch application paths. This is not an exhaustive audit of every historical branch.
  • An older native INI palette exists at https://github.com/achbed/notepad2-colors-solarized . Its README says Light/second-default Dark using Shift+F12, with only Default Text, Web Source Code, CSS and JavaScript covered. Treat as palette reference, not a complete theme or whole-app dark mode.

Notepad++ XML import is out of scope unless a later review demonstrates a concrete benefit. Do not upgrade Scintilla for this feature.

Activity

  1. itlezy commented on Nov 9, 2026

    @itlezy
    OwnerAuthor

    Implemented locally on branch chore/build-and-repo-policy in four granular commits (not pushed):

    • 509a743: Original/Dark editor palettes, menu, independent color persistence, shared non-color preferences, highlight colors.
    • 863b19e: safe defaults, Original preservation and native integration checks.
    • cdedc14: active-theme Reset plus real customization dialog coverage.
    • 4b3a555: usage and validation documentation.

    Validation:

    • Release/Debug x86/x64 builds passed.
    • Native integration suite passed on all four binaries: 38 schemes, 40 repeated switches, custom Original preservation, shared fonts, selection/viewport/undo availability, restart persistence, disabled settings saving, unknown selection and malformed saved default fallback, real Preview/Cancel/OK/Reset, second-default compatibility.
    • Seven-run x64 small-file measurement: median startup 71.84 ms baseline / 73.06 ms Original / 71.69 ms Dark; private memory 3204 / 3440 / 3440 KiB; 100 numeric delete/undo pairs 30.19 / 31.20 / 29.56 ms; sampled idle CPU deltas zero over 200 ms. Indicative local measurements, not large-file or general typing-performance proof.
    • Staged checks pass; working tree clean. Scintilla remains 3.7.6, with no new vendor patches, dependencies or background work.

    Boundaries: application chrome out of scope; no external theme loading or system-theme sync. Native autocomplete appearance and the existing bookmark pixmap are unchanged; background bookmark highlights and occurrences use theme colors. Full visual contrast review, large-file performance and manual legacy import/export dialog workflows are not claimed as tested here. Keep this issue open until the local work is reviewed/published.

  2. itlezy commented on Nov 9, 2026

    @itlezy
    OwnerAuthor

    First prerelease published: https://github.com/itlezy/notepad2-mod/releases/tag/v4.2.25.1029-rc.1

    • Merged PR Maintain Notepad2-mod with native editor themes and portable releases #7 with granular history preserved, followed by test-harness CI hardening in PR Allow bounded native startup time on hosted Windows runners #8.
    • Master and tag CI passed Release/Debug x86/x64, including native theme/customization/persistence tests across all 38 schemes.
    • Release publishing automatically assembled a draft, verified both portable ZIPs and SHA256SUMS.txt, and published it as a prerelease.
    • Downloaded the public x86/x64 ZIPs, verified archive checksums, source commit/version/architecture metadata and executable hashes, then ran the full native theme integration suite against both downloaded executables successfully.
    • Published binaries are unsigned. No changes were made to the installed system-wide executable, image redirection, file associations or existing user settings during CI setup.

    Future releases: merge green changes to master, derive the four-part executable version, and push v (stable) or v-rc.N (prerelease). Details are in Readme.md.

  3. itlezy commented on Nov 9, 2026

    @itlezy
    OwnerAuthor

    Published the focused follow-up as https://github.com/itlezy/notepad2-mod/releases/tag/v4.2.25.1040-rc.1 (merged PR #13).

    Hosted CI passed Release/Debug x86/x64 using pytest and pywinauto. Downloaded both public archives, verified SHA256 checksums, source/version metadata and executable hashes, then ran all 94 tests against each downloaded binary successfully.

    The release includes the save-prompt and MRU fixes, deterministic source charset, flag-aware elevated visibility, and the requested line copy/cut/paste shortcuts. The standard-user UAC interaction check remains manual in #12. System-wide installed executable and associations were not updated by this release task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions