Skip to content

feat: add a light theme beside the dark one, or the one the system uses - #63

Merged
Lars- merged 1 commit into
mainfrom
feat/light-theme
Nov 23, 2026
Merged

Lars- merged 1 commit into
mainfrom
feat/light-theme

Conversation

@Lars-

@Lars- Lars- commented Nov 23, 2026

Copy link
Copy Markdown
Owner

What this changes

The settings get a Theme row: Dark, Light or System. Light is a full theme, with colours of its own where GitCraft adds them to egui's:

  • Graph: the lanes a shade darker so thin lines and small dots read on white; branch and tag names in black, the ring around the checked-out commit and the outline of the current branch in black; tags on a light grey.
  • Diffs: pale green and red behind added and removed lines, stronger ones behind the words that changed; a picked line takes the selection colour.
  • Code: syntect's InspiredGitHub theme instead of base16-ocean.dark. Code is coloured on a thread, so a diff that is open when the theme changes is read and coloured again; until then it keeps the old colours.
  • Conflicts and error text: a light amber for a conflict without a pick, and a darker red for errors (now egui's own error_fg_color, set per theme).

The choice is egui's own theme preference, which eframe already saves with the zoom. An existing install saved Dark (the app set Dark on every start), so it keeps the look it has; a new one starts with System, which falls back to dark when the system does not say.

This finishes "Settings" on the roadmap.

How it is tested

  • a_light_theme_colours_diffs_and_code_for_a_light_background: opens the diff of a Rust file, picks Light in the settings, and waits until the open diff is coloured again in the light theme; then the keyword fn has another colour than before, the changed word sits on the light word colour and nothing on the dark one. Picking System sets egui's preference to System. It fails without colouring the open diff again.

  • code_takes_the_colours_of_its_language also checks that the light theme gives a keyword another colour.

  • Tried on Linux: the demo graph in light (labels, tags, current branch, HEAD ring), a Rust diff with word marks, a picked line and side by side, a switch back to dark with the diff open (coloured again at once), the conflict view with a pick, the New branch dialog, and Light still set after closing GitCraft and starting it again. An install that had the dark look before opened dark.

  • cargo fmt --all, cargo clippy --workspace --all-targets -- -D warnings and cargo test --workspace pass

  • It adds as little code as the change needs, and removes what it makes unnecessary

  • Nothing in it comes from GitKraken or another closed-source client (see CONTRIBUTING.md)

@Lars-
Lars- merged commit 03212b4 into main Nov 23, 2026
7 checks passed
@Lars-
Lars- deleted the feat/light-theme branch November 23, 2026 10:23
@Lars- Lars- mentioned this pull request Nov 23, 2026
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