Open BowenWang opened 5 years ago
That's strange... Something is causing the height of the entire modeline to increase, but I don't think it's telephone-line
since the separators are staying the same size... I don't see anything there that should be making the line taller, though. Is the font size increasing as you do this?
I am not very sure if font size increase, but it seems the same to me before and after this happens.
A very interesting fact is that this only happens in Emacs 25 and 26.
I too have this same problem in emacs 26.1 I like this package, lightweight, clean, and easy to customize. Since this modeline is almost always visible, this rendering is killing it, making it look ugly. I'm using color theme solarized, I get the same with doom-themes.
Oh, completely forgot about this issue. Could either of you send me your config? Also, what OS; I'm guessing @hubgitname you're on MacOS since you also have the srgb issue.
Yes @dbordak, I'm on MacOS Mojave 10.14.2 using gnu emacs 26.1 My telephone line settings:
(use-package telephone-line
:ensure t
:init
(setq telephone-line-lhs
'((evil . (telephone-line-evil-tag-segment))
(accent . (telephone-line-projectile-segment))
(nil . (telephone-line-airline-position-segment
telephone-line-buffer-segment
telephone-line-misc-info-segment))))
(setq telephone-line-rhs
'())
(setq telephone-line-primary-left-separator 'telephone-line-tan-right)
(which-func-mode 1)
(telephone-line-mode t))
I tried that config out and didn't have any problem, so it's something else in your config. I'm guessing your font. You can manually override telephone-line-height
to a larger value to try to fix the size issue.
The color issue is unrelated. See #54
Setting an appropriate value of telephone-line-height works, but if I change the font size, it gets messed up again. Is it possible to make the telephone-line-height a function/dependent on the font size ? That way no one has to mess with the height setting.
@maindoor That is the default behavior (when telephone-line-height is nil)
To be more specific, if telephone-line-height
is unset, it uses (frame-char-height)
, which is the pixel-height of the font you have set for the mode-line. Is it possible that this font is being changed after telephone-line is initialized for any of you? That'd probably cause a desync.
@dbordak since you're doing that, it couldn't be a telephone-line problem. I then narrowed it to my color-theme. Doom themes for some reason work well now without configuring the height. solarized-theme which I thought was a well written theme has this issue. Here is my config: (use-package solarized-theme :ensure t :if (display-graphic-p) :custom ;; Don't change the font for some headings and titles (solarized-use-variable-pitch nil) (x-underline-at-descent-line t) ;; Avoid all font-size changes (solarized-height-minus-1 1.0) (solarized-height-plus-1 1.0) (solarized-height-plus-2 1.0) (solarized-height-plus-3 1.0) (solarized-height-plus-4 1.0))
As far as I am concerned this is a theme issue and not a telephone line issue.
I realize that this is a very old issue. But I've had this problem a long time and only now when I rewrote my config I seem to have stumbled upon what seems to be a solution. At least it seems to be a solution for my specific problem, which judging by the graphical symptoms seems to be the same problem that you're dealing with in this issue . I can of course not guarantee that my issue is the exact same as described in this issue. Perhaps worth nothing is that I'm on Emacs 28.1, from Kelleyk's Ubuntu ppa.
But after reading this issue, I thought I'd try some more combinations of themes and modelines but it didn't help. Even the default theme with the default modeline had the issue. What has solved my problem is installing all the fonts from the package all-the-icons
. My all-the-icons
config used to look like
(use-package all-the-icons
:ensure t)
Now I have switched to
(use-package all-the-icons
:ensure t
:init
(if (not (file-exists-p (expand-file-name "~/.local/share/fonts/all-the-icons.ttf")))
(all-the-icons-install-fonts)))
Just to test if this really solved the problem, I've tried to remove all the files under ~/.local/share/fonts
and then the problem came back. If I install the fonts again, the problem goes away. So at least for me, the problem with the oversized modeline with weird rendering glitches seems to have been somehow related to all-the-icons
.
Hi I am using telephone line, when I just open Emacs, everything is fine. But after several times of Ctrl-x Ctrl-f(there will be a little window popped up let you select the file you want to open), every segments become larger like the following picture:
BTW, this only occurs on Emacs 25 and Emacs 26.