-
Notifications
You must be signed in to change notification settings - Fork 51
/
code-review-faces.el
163 lines (142 loc) · 5.02 KB
/
code-review-faces.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
;;; code-review-faces.el --- Define faces used in the package -*- lexical-binding: t; -*-
;;
;; Copyright (C) 2021 Wanderson Ferreira
;;
;; Author: Wanderson Ferreira <https://github.com/wandersoncferreira>
;; Maintainer: Wanderson Ferreira <[email protected]>
;; Version: 0.0.7
;; Homepage: https://github.com/wandersoncferreira/code-review-faces
;;
;; This file is not part of GNU Emacs.
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; For a full copy of the GNU General Public License
;; see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;; Define faces used in the package
;;
;;; Code:
(defface code-review-timestamp-face
`((((class color) (background light))
,@(and (>= emacs-major-version 27) '(:extend t))
:foreground "DimGrey"
:slant italic)
(((class color) (background dark))
,@(and (>= emacs-major-version 27) '(:extend t))
:foreground "DimGrey"
:slant italic))
"Face for timestamps."
:group 'code-review)
(defface code-review-comment-face
`((((class color) (background light))
,@(and (>= emacs-major-version 27) '(:extend t))
:foreground "DimGrey")
(((class color) (background dark))
,@(and (>= emacs-major-version 27) '(:extend t))
:foreground "LightGrey"))
"Face for comment sections."
:group 'code-review)
(defface code-review-thread-face
`((((class color) (background light))
,@(and (>= emacs-major-version 27) '(:extend t))
:foreground "SlateGrey"
:weight bold)
(((class color) (background dark))
,@(and (>= emacs-major-version 27) '(:extend t))
:foreground "SlateGrey"
:weight bold))
"Face for threads."
:group 'code-review)
(defface code-review-state-face
'((t :inherit bold))
"Face used for default state keywords."
:group 'code-review)
(defface code-review-checker-name-face
'((t :inherit bold :slant italic))
"Face used for commit check name."
:group 'code-review)
(defface code-review-checker-detail-face
'((t :inherit magit-section-heading
:slant italic
:weight normal))
"Face for details word."
:group 'code-review)
(defface code-review-author-face
'((t :inherit font-lock-keyword-face))
"Face used for author names."
:group 'code-review)
(defface code-review-author-header-face
'((t :inherit font-lock-keyword-face
:slant italic
:underline t))
"Face used for author name in the header."
:group 'code-review)
(defface code-review-error-state-face
'((t :inherit font-lock-warning-face :weight bold))
"Face used for error state (e.g. changes requested)."
:group 'code-review)
(defface code-review-success-state-face
`((((class color) (background light))
,@(and (>= emacs-major-version 27) '(:extend t))
:foreground "Green")
(((class color) (background dark))
,@(and (>= emacs-major-version 27) '(:extend t))
:foreground "Green"))
"Face used for success state (e.g. merged)."
:group 'code-review)
(defface code-review-info-state-face
'((t :slant italic))
"Face used for info (unimportant) state (e.g. resolved)."
:group 'code-review)
(defface code-review-pending-state-face
`((((class color) (background light))
,@(and (>= emacs-major-version 27) '(:extend t))
:foreground "yellow4")
(((class color) (background dark))
,@(and (>= emacs-major-version 27) '(:extend t))
:foreground "DarkKhaki"))
"Face used for pending state."
:group 'code-review)
(defface code-review-request-review-face
`((((class color) (background light))
,@(and (>= emacs-major-version 27) '(:extend t))
:foreground "yellow4"
:slant italic
:underline t)
(((class color) (background dark))
,@(and (>= emacs-major-version 27) '(:extend t))
:foreground "DarkKhaki"
:slant italic
:underline t))
"Face used for pending state."
:group 'code-review)
(defface code-review-recent-comment-heading
'((((supports (:box t))) :inherit magit-branch-remote :box t)
(t :inherit magit-branch-remote :inverse-video t))
"Face for recent comments."
:group 'code-review)
(defface code-review-outdated-comment-heading
'((((supports (:box t))) :inherit magit-cherry-equivalent :box t)
(t :inherit magit-cherry-equivalent :inverse-video t))
"Face for outdated comments."
:group 'code-review)
(defface code-review-dimmed
'((((class color) (background light))
:foreground "grey50"
:slant italic
:underline t)
(((class color) (background dark))
:foreground "grey50"
:slant italic
:underline t))
"Face for text that shouldn't stand out."
:group 'magit-faces)
(provide 'code-review-faces)
;;; code-review-faces.el ends here