rougier / nano-modeline

GNU Emacs / N Λ N O Modeline
GNU General Public License v3.0
170 stars 29 forks source link

Weird border and foreground color for inactive modeline when in bottom position #56

Open antrmn opened 1 year ago

antrmn commented 1 year ago

I'm using Emacs 29.0.91 with nano-theme (master branch) and the simpler branch of the nano-modeline (but the same issue can be reproduced with the nano-modeline from the master branch).

This is how the modeline looks when on top: Screenshot_20230605_174040

This is how it looks when on bottom: Screenshot_20230605_174205

To reproduce this beheaviour, run this with emacs -Q:

(add-to-list 'load-path <path-to>/nano-theme")
(add-to-list 'load-path "<path-to>/nano-modeline")
(require 'nano-theme)
(require 'nano-modeline)
(load-theme 'nano t)
(setopt nano-modeline-position 'nano-modeline-footer)
(nano-modeline-text-mode t)
rougier commented 1 year ago

Probably the mode-line-inactive face has some weird settings. Can you try to customize it and check how it is configured ?

antrmn commented 1 year ago

These are the parameters of the mode-line-inactive face, as seen from the customization panel:

((t
  (:box
   (:line-width
    (3 . 3)
    :color "#90A4AE" :style nil)
   :foreground "#FFFFFF" :background "#90A4AE")))

These settings are the same whether i load nano-theme + nano-modeline or just nano-theme.

The same applies for the mode-line face:

((t
  (:box
   (:line-width
    (3 . 3)
    :color "#37474F" :style nil)
   :foreground "#FFFFFF" :background "#37474F")))

I believe the border issue can be solved by setting the following parameter for both mode-line and mode-line-inactive faces.

(:box (:line-width (3 . 3) :color nil :style flat-button)

This way the border gets the same color of the background.

As for the foreground color, both mode-line and mode-line-inactive have a white foreground (Set by nano-theme).

nano-modeline customizes its modeline using the following faces:

nano-modeline-inactive does not have a configured foreground (unlike the other 2 faces), so the mode-line falls back to the white foreground from mode-line-inactive

rougier commented 1 year ago

These defaults are probably saved in your custom settings (either at the end of your init.el file or in custom.el)

antrmn commented 1 year ago

I have used "emacs -Q" when looking upon the face customization panel. This is the code that i fed to M-::

(add-to-list 'load-path <path-to>/nano-theme")
(add-to-list 'load-path "<path-to>/nano-modeline")
(require 'nano-theme)
(require 'nano-modeline)
(load-theme 'nano t)
(setopt nano-modeline-position 'nano-modeline-footer)
(nano-modeline-prog-mode t)

then I executed M-x customize. I believe no init.el or custom.file has been loaded

rougier commented 1 year ago

Oh I see, the (3 . 3) comes from nano-theme. So best would be to set it to no box at all.

antrmn commented 1 year ago

Also keeping the box with (3 . 3) but setting its color to nil would be an option, so that it wouldn't affect people who use nano-theme but not nano-modeline.