Repository navigation
[UI] Fix images and branch labels showing wrong colors in dark mode - #730
Conversation
9d9bd90 to
669b650
Compare
|
Both flagged screenshots are 1-bit noise, not rendering changes. Checked at pixel level against the baseline panel:
The two views this PR actually restyles, Worth noting that the suite therefore does not cover what this PR fixes. Dark mode is not captured, so the evidence for it is the before/after WebView renders in the test plan rather than CI. |
|
Root cause of noise: |
Let's see if it works #740 |
Great! I will rebase my change and see. |
669b650 to
e08744f
Compare
|
I tried already to explain it here #740 (comment) |
|
You're right, the compare needs the fuzz up front. The early check in |
d76fdf9 to
75596f6
Compare
#743 Please rebase to master to see if it works now |
Give the HTML views real dark colors instead of inverting the whole page, so what they show in its own colors keeps them. - Drop the page-wide invert filter, and the partial undo on images, from the history, commit, log and diff views - Give every color those views set a dark twin, computed as what the filter turned it into, so the dark look stays as it was - Keep images, file icons and branch labels in their true colors, and let the context slider draw as a native dark control
75596f6 to
616fd62
Compare
Tested OK - I think it is safe to merge, thanks! |
Show images and branch labels in their true colours in dark mode, by giving the history, commit, log and diff views real dark colours instead of inverting the whole page. Supersedes #729, which fixed only the labels.
In dark mode
GitX.cssran each of these pages throughinvert(0.89) hue-rotate(180deg), and tried to undo it on images with a second filter pluscontrast(160%). The undo cannot be exact, since the invert squeezes every colour into a narrower range, so a changed image shown in a commit's diff came out in the wrong colours: red#e02020as a dusty#b4625f, yellow#fced6fas a pinkish grey. Gravatars, the file-type icons and the branch labels were affected the same way. Blame and the file view already had a dark theme of their own and are not touched.Changes
.body--darksets the page's text and background colours directly, and images are shown as they are..body--darktwin, computed as exactly what the filter turned it into, so the dark look is unchanged. The twins were generated from the stylesheets rather than written by hand. The one semi-transparent colour, the trailing-whitespace marker, was solved separately so it lands on the same colour over both greens it is drawn on.Screenshots
Before
After
Test plan