Closed CSRaghunandan closed 4 years ago
This is the same issue as #387. It cannot be fixed given it's a problem specific to all-the-icons
.
Actually, we may be able to address it. The issue lies in the doom-colors
theme introduced in #347. The default doom-atom
theme works fine:
Looking at the doom-colors theme, there are no :height
properties in use.
@CSRaghunandan Does this fix the issue?
(require 'treemacs)
(treemacs-create-theme "doom-colors"
:extends "doom-atom"
:config
(progn
(treemacs-create-icon
:icon (format " %s\t" (all-the-icons-octicon "repo" :height 1.2 :v-adjust -0.1 :face 'doom-themes-treemacs-root-face))
:extensions (root))
(treemacs-create-icon
:icon (format "%s\t" (all-the-icons-octicon "flame" :height 0.8 :v-adjust 0 :face 'all-the-icons-red))
:extensions (error))
(treemacs-create-icon
:icon (format "%s\t" (all-the-icons-octicon "stop" :height 0.8 :v-adjust 0 :face 'all-the-icons-yellow))
:extensions (warning))
(treemacs-create-icon
:icon (format "%s\t" (all-the-icons-octicon "info" :height 0.75 :v-adjust 0.1 :face 'all-the-icons-green))
:extensions (info))
(treemacs-create-icon
:icon (format " %s\t" (all-the-icons-alltheicon "git" :height 0.85 :face 'all-the-icons-red))
:extensions ("gitignore" "git" "gitconfig" "gitmodules"))
(dolist (item all-the-icons-icon-alist)
(let* ((extensions (doom-themes--get-treemacs-extensions (car item)))
(func (cadr item))
(args (append (list (caddr item)) '(:v-adjust -0.05 :height 0.85) (cdddr item)))
(icon (apply func args)))
(let* ((icon-pair (cons (format " %s\t" icon) " "))
(gui-icons (treemacs-theme->gui-icons treemacs--current-theme))
(tui-icons (treemacs-theme->tui-icons treemacs--current-theme))
(gui-icon (car icon-pair))
(tui-icon (cdr icon-pair)))
(--each extensions
(ht-set! gui-icons it gui-icon)
(ht-set! tui-icons it tui-icon)))))))
(treemacs-load-theme "doom-colors")
@hlissner. You're right, that's a solution but I think it's more like a workaround. The core issue is the fonts that all-the-icons use, and that as I understand, it's pretty difficult to solve. I think the problem has been addressed several times in all-the-icons's repo, however, nobody has come with a proper solution yet.
Although... wait a minute. @seagle0128, how do you align the .gitignore file here #347?
It's aligned because the icons next to it are from the same iconset (with the same size problem). If you look at the grey icons (from the octicons set), they're unaligned. In our themes we are setting :height for all our icons, so they are a good deal smaller.
EDIT: Oh, the octicons iconset is just naturally smaller, too.
The solution would be to stop manipulating :height blow up the octicon icons or shrink the colored filetype icons.
Yes, that's the problem, the default font sizes are inconsistent and there's several file icons that come from other fonts such as the go icon for example (although I think there's an alternative one that can be used instead, I'll submit a PR requesting to change it. It's even more visible than the current one).
Alright. In the meantime I've done some triage in 9549c7c.
@CSRaghunandan Let me know if that doesn't help and I'll reopen the issue.
Alright. In the meantime I've done some triage in 9549c7c.
@CSRaghunandan Let me know if that doesn't help and I'll reopen the issue.
Thanks a lot for the quick response and fix. I'll check it out and get back to you.
Although... wait a minute. @seagle0128, how do you align the .gitignore file here #347?
I think it may be related to the font faamily. The icons are aligned iwith menlo
and SF mono
in my MacBook.
@hlissner seems to be fixed after the latest commit.
Thank you :)
Nice work! @hlissner
@hlissner tab-width
is not set to 1
when doom-themes-emacs-config
is enabled. I have to set it to 1
manually for it to look clean. You might want to look at this again.
Thanks
Attached is a screnshot for reference. The original theme for treemacs does not have this issue. This affects both
treemacs
andtreemacs-dired-icons-mode