branch: externals/doric-themes commit 0af07de569816bb0d9464c843aae120c02df1a2a Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Make the diffs use background colours as well This is better for usability. I tried the foreground-only design for several months and could still not get used to it. I would frequently mistake parts of a diff hunk as belonging to another. --- doric-themes.el | 49 +++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/doric-themes.el b/doric-themes.el index b1afe2fefa..679fa270b7 100644 --- a/doric-themes.el +++ b/doric-themes.el @@ -313,7 +313,6 @@ Run `doric-themes-after-load-theme-hook' after loading a theme." icomplete-selected-match ido-first-match magit-diff-file-heading-selection - magit-section-heading-selection markdown-highlighting-face mode-line-highlight next-error @@ -729,7 +728,6 @@ Run `doric-themes-after-load-theme-hook' after loading a theme." log-edit-unknown-header log-view-commit-body magit-cherry-equivalent - magit-diff-context-highlight magit-bisect-bad magit-bisect-good magit-bisect-skip @@ -913,11 +911,8 @@ Run `doric-themes-after-load-theme-hook' after loading a theme." magit-branch-remote magit-branch-remote-head magit-branch-upstream - magit-diff-conflict-heading - magit-diff-hunk-heading-highlight magit-mode-line-process magit-process-ok - magit-section-heading magit-signature-good magit-tag Man-overstrike @@ -1031,8 +1026,6 @@ Run `doric-themes-after-load-theme-hook' after loading a theme." info-header-xref line-number-major-tick magit-branch-warning - magit-diff-file-heading-highlight - magit-diff-lines-heading magit-process-ng magit-signature-bad marginalia-file-priv-dir @@ -1119,8 +1112,6 @@ Run `doric-themes-after-load-theme-hook' after loading a theme." line-number-minor-tick magit-branch-current magit-cherry-unmatched - magit-diff-hunk-heading - magit-diff-file-heading magit-signature-error magit-signature-expired magit-signature-expired-key @@ -1222,12 +1213,14 @@ Run `doric-themes-after-load-theme-hook' after loading a theme." diff-added diff-indicator-added ediff-current-diff-B - magit-diff-added magit-diff-added-highlight magit-diffstat-added smerge-lower ztreep-diff-model-add-face)) +(defconst doric-themes-diff-added-faces-foreground-only + '(magit-diff-added)) + (defconst doric-themes-diff-added-refine-faces '(diff-refine-added ediff-fine-diff-B @@ -1238,10 +1231,12 @@ Run `doric-themes-after-load-theme-hook' after loading a theme." diff-changed-unspecified diff-indicator-changed ediff-current-diff-C - magit-diff-base magit-diff-base-highlight smerge-base)) +(defconst doric-themes-diff-changed-faces-foreground-only + '(magit-diff-base)) + (defconst doric-themes-diff-changed-refine-faces '(diff-refine-changed ediff-fine-diff-C @@ -1252,12 +1247,14 @@ Run `doric-themes-after-load-theme-hook' after loading a theme." diff-removed diff-indicator-removed ediff-current-diff-A - magit-diff-removed magit-diff-removed-highlight magit-diffstat-removed smerge-upper ztreep-diff-model-diff-face)) +(defconst doric-themes-diff-removed-faces-foreground-only + '(magit-diff-removed)) + (defconst doric-themes-diff-removed-refine-faces '(diff-refine-removed ediff-fine-diff-A @@ -1379,12 +1376,15 @@ Run `doric-themes-after-load-theme-hook' after loading a theme." ,@(doric-themes-prepare-faces doric-themes-selection-faces :background 'bg-accent) - ,@(doric-themes-prepare-faces doric-themes-diff-added-faces :background ''unspecified :foreground 'fg-faint-green) - ,@(doric-themes-prepare-faces doric-themes-diff-added-refine-faces :inherit ''bold :background ''unspecified :foreground 'fg-faint-green) - ,@(doric-themes-prepare-faces doric-themes-diff-changed-faces :background ''unspecified :foreground 'fg-faint-yellow) - ,@(doric-themes-prepare-faces doric-themes-diff-changed-refine-faces :inherit ''bold :background ''unspecified :foreground 'fg-faint-yellow) - ,@(doric-themes-prepare-faces doric-themes-diff-removed-faces :background ''unspecified :foreground 'fg-faint-red) - ,@(doric-themes-prepare-faces doric-themes-diff-removed-refine-faces :inherit ''bold :background ''unspecified :foreground 'fg-faint-red) + ,@(doric-themes-prepare-faces doric-themes-diff-added-faces :background 'bg-green :foreground 'fg-green) + ,@(doric-themes-prepare-faces doric-themes-diff-added-faces-foreground-only :foreground 'fg-green) + ,@(doric-themes-prepare-faces doric-themes-diff-added-refine-faces :inherit ''bold) + ,@(doric-themes-prepare-faces doric-themes-diff-changed-faces :background 'bg-yellow :foreground 'fg-yellow) + ,@(doric-themes-prepare-faces doric-themes-diff-changed-faces-foreground-only :foreground 'fg-yellow) + ,@(doric-themes-prepare-faces doric-themes-diff-changed-refine-faces :inherit ''bold) + ,@(doric-themes-prepare-faces doric-themes-diff-removed-faces :background 'bg-red :foreground 'fg-red) + ,@(doric-themes-prepare-faces doric-themes-diff-removed-faces-foreground-only :foreground 'fg-red) + ,@(doric-themes-prepare-faces doric-themes-diff-removed-refine-faces :inherit ''bold) '(embark-keybinding ((t :inherit (fixed-pitch bold-italic)))) @@ -1454,8 +1454,17 @@ Run `doric-themes-after-load-theme-hook' after loading a theme." `(keycast-key ((t :inherit bold-italic :background ,fg-shadow-intense :foreground ,bg-main))) - `(magit-diff-context-highlight (( ))) - `(magit-section-highlight (( ))) + `(magit-diff-context-highlight ((t :background ,bg-shadow-subtle :foreground ,fg-shadow-subtle))) + `(magit-diff-file-heading ((t :inherit bold :foreground ,fg-accent))) + `(magit-diff-file-heading-highlight ((t :inherit magit-diff-file-heading :background ,bg-shadow-subtle))) + `(magit-diff-file-heading-selection ((t :inherit bold :background ,bg-accent))) + `(magit-diff-hunk-heading ((t :background ,bg-shadow-subtle))) + `(magit-diff-hunk-heading-highlight ((t :inherit bold :background ,bg-neutral))) + `(magit-diff-hunk-heading-selection ((t :inherit bold :background ,bg-accent))) + `(magit-diff-lines-heading ((t :background ,fg-shadow-subtle :foreground ,bg-main))) + `(magit-section-heading ((t :inherit bold))) + `(magit-section-heading-selection ((t :inherit bold :background ,bg-accent))) + `(magit-section-highlight ((t :background ,bg-shadow-subtle))) `(markdown-code-face ((t :inherit fixed-pitch :background ,bg-shadow-subtle :extend t))) `(markdown-language-keyword-face ((t :inherit fixed-pitch :background ,bg-neutral :foreground ,fg-neutral)))