emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making `x-underline-at-descent-line' a face attribute


From: Jim Porter
Subject: Re: Making `x-underline-at-descent-line' a face attribute
Date: Thu, 6 Jan 2022 09:47:33 -0800

On 1/6/2022 12:43 AM, Eli Zaretskii wrote:
From: Jim Porter <jporterbugs@gmail.com>
Date: Wed, 5 Jan 2022 21:08:57 -0800

What about enhancing the :box attribute further to allow different
widths (and possibly colors) for each of the 4 sides?

The width part is already supported.  We could make the value of
:color be a cons cell as well, if that is useful (is it?)

Looking at the docs for :box, I only see the ability to set separate vertical and horizontal widths (but not to set all 4 sides to different values). The latter would be useful in some cases, for example to make the tab-bar tabs look more like tabs. You could specify a box with a border on all sides but the bottom for the active tab, and a border *only* on the bottom for inactive tabs, so you get something like:

              +----------+
    inactive  |  active  |  inactive
  ------------+          +------------

One benefit of making :color a cons cell is that it would be possible to create an effect like `:style released-button', but allow the programmer to control the exact colors to use. That could be useful in some situations. For instance, the modeline could have a border at the top and bottom (but not the sides) with different colors to make it appear raised. I tried using `:style released-button' for that, but it appears to only support a :box with non-zero widths on all sides.

But mixing :box and :underline is IMO not a good idea.  They are
separate attributes.

I think I agree. From the original message, it sounded like the goal was to get a border around the modeline, so using :underline isn't the ideal option semantically. If :box were more flexible, it'd be possible to use that to draw borders around things, even if that "border" was just on the bottom (making it look similar to an underline).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]