dracula / emacs

🧛🏻‍♂️ Dark theme for Emacs
https://draculatheme.com/emacs
MIT License
330 stars 87 forks source link

Minor UI fixes #91

Closed saccarosium closed 2 years ago

saccarosium commented 2 years ago

Hi, I wanna bring up some inconsistencies between this and the other implementations of the theme.

Line number

The line number face has the slant italic and for foreground "bg4". In other editor such as VScode, nvim and atom is not the case.

Emacs

Screenshot 2022-01-19 at 4 05 43 PM

Nvim

Screenshot 2022-01-19 at 4 07 13 PM

VScode

Screenshot 2022-01-19 at 4 07 28 PM

Atom

Screenshot 2022-01-19 at 4 07 40 PM

The patch simply removes the italic, makes the foreground "dracula-comment" and makes the background "nil", in case the user want to change the background color to a different one.

@@ -113,6 +113,8 @@ read it before opening a new issue about your will.")
                (info-string :foreground ,dracula-yellow)
                (lazy-highlight :foreground ,fg2 :background ,bg2)
                (link :foreground ,dracula-cyan :underline t)
+               (linum :foreground ,dracula-comment :background nil)
+               (line-number :inherit linum)
-               (linum :slant italic :foreground ,bg4 :background ,dracula-bg)
-               (line-number :slant italic :foreground ,bg4 :background ,dracula-bg)
                (match :background ,dracula-yellow :foreground ,dracula-bg)

Different colors (only in graphical emacs)

In other implementations usually they are using some colors not listed in the docs such as: "#21222c" and "#191a21".

VScode

Screenshot 2022-01-19 at 4 17 09 PM

Atom

Screenshot 2022-01-19 at 4 23 49 PM

I think it will be nice implementing this colors in variables such as "contrast" and "unfocus" (the names are only an example).

@@ -98,7 +98,9 @@ read it before opening a new issue about your will.")
                 (fg2             "#e2e2dc" "#e4e4e4" "brightwhite")
                 (fg3             "#ccccc7" "#c6c6c6" "white")
                 (fg4             "#b6b6b2" "#b2b2b2" "white")
                 (other-blue      "#0189cc" "#0087ff" "brightblue")
+                (contrast        "#191a21")
+                (unfocus         "#21222c"))

Mode-line (Personal taste)

Implementing the different colors contrasts make it so we can ditch the ":box" attribute for distinguishing active and inactive splits, and instead using colors.

without patch

Screenshot 2022-01-19 at 4 53 25 PM

with patch

Screenshot 2022-01-19 at 4 55 18 PM
@@ -543,16 +548,16 @@ read it before opening a new issue about your will.")
                (message-cited-text-4 :foreground ,fg2)
                (message-mml :foreground ,dracula-green :weight normal)
                ;; mode-line
-               (mode-line :background ,dracula-current
-                          :box ,dracula-current :inverse-video nil
+               (mode-line
+                :background ,dracula-current :inverse-video nil
                           ,@(if dracula-alternate-mode-line-and-minibuffer
                                 (list :foreground fg3)
                               (list :foreground dracula-fg)))
                (mode-line-inactive
-                :background ,dracula-bg :inverse-video nil
+                :background ,unfocus :inverse-video nil :box nil
                 ,@(if dracula-alternate-mode-line-and-minibuffer
-                      (list :foreground dracula-comment :box dracula-bg)
-                    (list :foreground fg4 :box bg2)))
+                      (list :foreground dracula-comment)
+                    (list :foreground fg4 )))

Bookmarks

before the patch

Screenshot 2022-01-19 at 5 32 37 PM

after the patch

Screenshot 2022-01-19 at 5 33 32 PM
                (success :foreground ,dracula-green)
                (tooltip :foreground ,dracula-fg :background ,dracula-current)
+               (bookmark-face :background nil :foreground nil)
                (trailing-whitespace :background ,dracula-orange)
                (vertical-border :foreground ,bg2)
milouse commented 2 years ago

Thanks for your report. I’ll take some time to review it and see what I can/want to do with this different thing.