Skip to content

Fix branch labels turning dark in the commit details in dark mode - #729

Closed
goneng wants to merge 1 commit into
masterfrom
history-dark-ref-labels
Closed

goneng wants to merge 1 commit into
masterfrom
history-dark-ref-labels

Conversation

@goneng

@goneng goneng commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

Show a commit's branch and tag labels in the details pane in the same colours as in the history list when GitX is in dark mode. Today they come out dark (the checked-out branch's orange turns brown, for instance) with light text.

The HTML views have no dark theme of their own: in dark mode GitX.css runs the whole page through invert(0.89) hue-rotate(180deg), which darkens the labels along with everything else. A filter cannot be undone from inside the element it is on, and undoing it on the labels alone cannot bring the saturated colours back (the invert squeezes every colour into a narrower range), so the labels have to be kept out of it.

Changes

  • In the history view, the dark-mode filter moves from the page onto the parts around the labels: the Gist button, the header's property names and values, the commit ID, the message, the file list and the diff. The labels, which sit next to the commit ID, are left unfiltered and keep their colours and black text.
  • Nothing else changes: the rest of the history page renders as before, and the other views (commit, diff, blame, file view, log), which show no labels, keep the page-wide filter.

A real dark theme for all the HTML views would make the filter unnecessary; that is a larger change and is left for later.

Test plan

  • An offscreen WebView render of the real views/history/index.html in dark mode, with a label of each kind: the label colours now match the light-mode render exactly (they were darkened before), and outside the labels no pixel moves by more than 1 in 255 against master. The light-mode render is identical to master's.
  • The same render with the WebView's background off, as GitX sets it, gives the same result.
  • In the Debug build, in dark mode, the details pane of a commit with local, remote and checked-out branch labels.

Show the commit's labels in the same colours as the history list, by
keeping them out of the filter that darkens the details page.

- In the history view, move the dark-mode invert filter from the whole
  page onto the parts around the labels, so they keep their colours
- Leave the rest of the page as it rendered before, and leave the other
  views, which have no labels, on the page-wide filter
@hannesa2

Copy link
Copy Markdown
Contributor

Screenshot differs: emulatorApi=arm64 with 2 screenshot(s)

setpoint (old) | diff | actual screenshot (new)

commit-context-menu.pngscreenshot

settings-general.pngscreenshot

@goneng

goneng commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #730, which fixes the labels along with images and icons by replacing the dark-mode filter.

@goneng goneng closed this Sep 25, 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.

2 participants