nano-modeline icon indicating copy to clipboard operation
nano-modeline copied to clipboard

[Question] Adding a newline between header-line and the buffer text.

Open kwojcik-blockether opened this issue 3 years ago • 3 comments

Thank you for this visually appealing package. Would you please be so kind and let me know whether it's possible to add an extra margin between the header-line and the buffer text? Thanks in advance and all the best!

kwojcik-blockether avatar Jun 25 '22 11:06 kwojcik-blockether

If you have a background color for the header line, I don't think is is possible. Else, you can exploit the raise display properties.

rougier avatar Jun 25 '22 16:06 rougier

image Am having the same problem, the top line needs more room to breath. Edit: seems Emacs has no way to set a margin on top/bottom, just fringe left/right. Wished we simply had css for these sorta things.

artelse avatar Jul 25 '22 22:07 artelse

Maybe you can insert a (white) space in front of the prefix (RW) with a tiny font (like :height 10) and adds a display property with e.g. (raise -1.0). This basically tell Emacs the character is below the baseline and it should enlarge the whole header line:

(setq header-line-format
      (concat (propertize "#" 'display '(raise -1.5) 'face '(:foreground "white"))
	      (propertize "Hello" 'display '(raise -0.75)
			  'face '(:background "yellow"
						       :box (:line-width (0 . -5) :color "white" :style flat)
						       ))))

rougier avatar Aug 08 '22 14:08 rougier