diff options
| author | Juri Linkov | 2026-01-11 20:58:28 +0200 |
|---|---|---|
| committer | Juri Linkov | 2026-01-11 20:58:28 +0200 |
| commit | 762902c2c62de1853472c2c1a1a724ea67be45c4 (patch) | |
| tree | c4525ddd24563e8aaf7ec9a9d06975d40722196e | |
| parent | 990ef365108579e44a54a44f2e2ac89cf83b3854 (diff) | |
| download | emacs-762902c2c62de1853472c2c1a1a724ea67be45c4.tar.gz emacs-762902c2c62de1853472c2c1a1a724ea67be45c4.zip | |
Adapt tab-bar/tab-line faces to dark background mode (bug#80135)
* lisp/faces.el (tab-bar, tab-line): Adapt to dark background.
Suggested by Philip Kaludercic <philipk@posteo.net>.
* lisp/tab-bar.el (tab-bar-tab, tab-bar-tab-inactive, tab-bar-tab-highlight):
* lisp/tab-line.el (tab-line-tab, tab-line-tab-inactive)
(tab-line-tab-current, tab-line-highlight): Adapt faces to dark background.
| -rw-r--r-- | lisp/faces.el | 13 | ||||
| -rw-r--r-- | lisp/tab-bar.el | 16 | ||||
| -rw-r--r-- | lisp/tab-line.el | 22 |
3 files changed, 41 insertions, 10 deletions
diff --git a/lisp/faces.el b/lisp/faces.el index 4555c92f201..f87ef932023 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -2963,10 +2963,14 @@ Note: Other faces cannot inherit from the cursor face." | |||
| 2963 | :group 'basic-faces) | 2963 | :group 'basic-faces) |
| 2964 | 2964 | ||
| 2965 | (defface tab-bar | 2965 | (defface tab-bar |
| 2966 | '((((class color) (min-colors 88)) | 2966 | '((((class color) (min-colors 88) (background light)) |
| 2967 | :inherit variable-pitch | 2967 | :inherit variable-pitch |
| 2968 | :background "grey85" | 2968 | :background "grey85" |
| 2969 | :foreground "black") | 2969 | :foreground "black") |
| 2970 | (((class color) (min-colors 88) (background dark)) | ||
| 2971 | :inherit variable-pitch | ||
| 2972 | :background "grey20" | ||
| 2973 | :foreground "white") | ||
| 2970 | (((class mono)) | 2974 | (((class mono)) |
| 2971 | :background "grey") | 2975 | :background "grey") |
| 2972 | (t | 2976 | (t |
| @@ -2976,11 +2980,16 @@ Note: Other faces cannot inherit from the cursor face." | |||
| 2976 | :group 'basic-faces) | 2980 | :group 'basic-faces) |
| 2977 | 2981 | ||
| 2978 | (defface tab-line | 2982 | (defface tab-line |
| 2979 | '((((class color) (min-colors 88)) | 2983 | '((((class color) (min-colors 88) (background light)) |
| 2980 | :inherit variable-pitch | 2984 | :inherit variable-pitch |
| 2981 | :height 0.9 | 2985 | :height 0.9 |
| 2982 | :background "grey85" | 2986 | :background "grey85" |
| 2983 | :foreground "black") | 2987 | :foreground "black") |
| 2988 | (((class color) (min-colors 88) (background dark)) | ||
| 2989 | :inherit variable-pitch | ||
| 2990 | :height 0.9 | ||
| 2991 | :background "grey20" | ||
| 2992 | :foreground "white") | ||
| 2984 | (((class mono)) | 2993 | (((class mono)) |
| 2985 | :background "grey") | 2994 | :background "grey") |
| 2986 | (t | 2995 | (t |
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index f9df4110757..8f70866d99f 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el | |||
| @@ -48,8 +48,12 @@ | |||
| 48 | (defface tab-bar-tab | 48 | (defface tab-bar-tab |
| 49 | '((default | 49 | '((default |
| 50 | :inherit tab-bar) | 50 | :inherit tab-bar) |
| 51 | (((class color) (min-colors 88)) | 51 | (((class color) (min-colors 88) (background light)) |
| 52 | :box (:line-width 1 :style released-button)) | 52 | :box (:line-width 1 :style released-button)) |
| 53 | (((class color) (min-colors 88) (background dark)) | ||
| 54 | :box (:line-width 1 :style released-button) | ||
| 55 | :background "grey40" | ||
| 56 | :foreground "white") | ||
| 53 | (t | 57 | (t |
| 54 | :inverse-video nil)) | 58 | :inverse-video nil)) |
| 55 | "Tab bar face for selected tab." | 59 | "Tab bar face for selected tab." |
| @@ -59,8 +63,10 @@ | |||
| 59 | (defface tab-bar-tab-inactive | 63 | (defface tab-bar-tab-inactive |
| 60 | '((default | 64 | '((default |
| 61 | :inherit tab-bar-tab) | 65 | :inherit tab-bar-tab) |
| 62 | (((class color) (min-colors 88)) | 66 | (((class color) (min-colors 88) (background light)) |
| 63 | :background "grey75") | 67 | :background "grey75") |
| 68 | (((class color) (min-colors 88) (background dark)) | ||
| 69 | :background "grey20") | ||
| 64 | (t | 70 | (t |
| 65 | :inverse-video t)) | 71 | :inverse-video t)) |
| 66 | "Tab bar face for non-selected tab." | 72 | "Tab bar face for non-selected tab." |
| @@ -86,10 +92,14 @@ | |||
| 86 | :group 'tab-bar-faces) | 92 | :group 'tab-bar-faces) |
| 87 | 93 | ||
| 88 | (defface tab-bar-tab-highlight | 94 | (defface tab-bar-tab-highlight |
| 89 | '((((class color) (min-colors 88)) | 95 | '((((class color) (min-colors 88) (background light)) |
| 90 | :box (:line-width 1 :style released-button) | 96 | :box (:line-width 1 :style released-button) |
| 91 | :background "grey85" | 97 | :background "grey85" |
| 92 | :foreground "black") | 98 | :foreground "black") |
| 99 | (((class color) (min-colors 88) (background dark)) | ||
| 100 | :box (:line-width 1 :style released-button) | ||
| 101 | :background "grey40" | ||
| 102 | :foreground "white") | ||
| 93 | (t :inverse-video nil)) | 103 | (t :inverse-video nil)) |
| 94 | "Tab bar face for highlighting." | 104 | "Tab bar face for highlighting." |
| 95 | :version "31.1" | 105 | :version "31.1" |
diff --git a/lisp/tab-line.el b/lisp/tab-line.el index 7ff36a5250f..aa75f738285 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el | |||
| @@ -62,8 +62,12 @@ is selected." | |||
| 62 | 62 | ||
| 63 | (defface tab-line-tab | 63 | (defface tab-line-tab |
| 64 | '((default :inherit tab-line) | 64 | '((default :inherit tab-line) |
| 65 | (((class color) (min-colors 88)) | 65 | (((class color) (min-colors 88) (background light)) |
| 66 | :box (:line-width 1 :style released-button)) | 66 | :box (:line-width 1 :style released-button)) |
| 67 | (((class color) (min-colors 88) (background dark)) | ||
| 68 | :box (:line-width 1 :style released-button) | ||
| 69 | :background "grey40" | ||
| 70 | :foreground "white") | ||
| 67 | (t :inverse-video nil)) | 71 | (t :inverse-video nil)) |
| 68 | "Tab line face for selected tab." | 72 | "Tab line face for selected tab." |
| 69 | :version "27.1" | 73 | :version "27.1" |
| @@ -71,8 +75,10 @@ is selected." | |||
| 71 | 75 | ||
| 72 | (defface tab-line-tab-inactive | 76 | (defface tab-line-tab-inactive |
| 73 | '((default :inherit tab-line-tab) | 77 | '((default :inherit tab-line-tab) |
| 74 | (((class color) (min-colors 88)) | 78 | (((class color) (min-colors 88) (background light)) |
| 75 | :background "grey75") | 79 | :background "grey75") |
| 80 | (((class color) (min-colors 88) (background dark)) | ||
| 81 | :background "grey20") | ||
| 76 | (t :inverse-video t)) | 82 | (t :inverse-video t)) |
| 77 | "Tab line face for non-selected tab." | 83 | "Tab line face for non-selected tab." |
| 78 | :version "27.1" | 84 | :version "27.1" |
| @@ -115,17 +121,23 @@ function `tab-line-tab-face-group'." | |||
| 115 | 121 | ||
| 116 | (defface tab-line-tab-current | 122 | (defface tab-line-tab-current |
| 117 | '((default :inherit tab-line-tab) | 123 | '((default :inherit tab-line-tab) |
| 118 | (((class color) (min-colors 88)) | 124 | (((class color) (min-colors 88) (background light)) |
| 119 | :background "grey85")) | 125 | :background "grey85") |
| 126 | (((class color) (min-colors 88) (background dark)) | ||
| 127 | :background "grey40")) | ||
| 120 | "Tab line face for tab with current buffer in selected window." | 128 | "Tab line face for tab with current buffer in selected window." |
| 121 | :version "27.1" | 129 | :version "27.1" |
| 122 | :group 'tab-line-faces) | 130 | :group 'tab-line-faces) |
| 123 | 131 | ||
| 124 | (defface tab-line-highlight | 132 | (defface tab-line-highlight |
| 125 | '((((class color) (min-colors 88)) | 133 | '((((class color) (min-colors 88) (background light)) |
| 126 | :box (:line-width 1 :style released-button) | 134 | :box (:line-width 1 :style released-button) |
| 127 | :background "grey85" | 135 | :background "grey85" |
| 128 | :foreground "black") | 136 | :foreground "black") |
| 137 | (((class color) (min-colors 88) (background dark)) | ||
| 138 | :box (:line-width 1 :style released-button) | ||
| 139 | :background "grey40" | ||
| 140 | :foreground "white") | ||
| 129 | (t :inverse-video nil)) | 141 | (t :inverse-video nil)) |
| 130 | "Tab line face for highlighting." | 142 | "Tab line face for highlighting." |
| 131 | :version "27.1" | 143 | :version "27.1" |