all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#59947: 30.0.50; Underline of tab-bar face does not respect x-underline-at-descent-line
@ 2022-12-10 18:22 Gabriel
  2022-12-10 19:12 ` Eli Zaretskii
  2022-12-11 17:12 ` Juri Linkov
  0 siblings, 2 replies; 5+ messages in thread
From: Gabriel @ 2022-12-10 18:22 UTC (permalink / raw)
  To: 59947

[-- Attachment #1: Type: text/plain, Size: 2224 bytes --]

Description:

Apparently, the underline property of tab-bar (and tab-bar-*) face does
not respect the option x-underline-at-descent-line.  When
x-underline-at-descent-line is set to t, the underline is displayed at
descent level (below of bottom box), but in tab-bar face it's displayed
at the baseline (above of bottom box).  See steps below and attached
images for more information.

Steps:

1) emacs -q (master "fbbf3610fd5b27873e13cfd7702d5b0bbb15c2f8")

2) Enable tab-bar and tab-line:

(progn
  (tab-bar-mode 1)
  (global-tab-line-mode 1))

3) Set box, overline and underline of tab-tab face:

(set-face-attribute 'tab-bar
                    nil
                    :box '(:style flat-button
                           :line-width 12
                           :color "green")
                    :overline "red"
                    :underline "red")

Result: a green box is displayed in tab-bar, a red overline is displayed
above of top box and a red underline is displayed above of bottom box.

4) Set box, overline and underline of tab-line face:

(set-face-attribute 'tab-line
                    nil
                    :box '(:style flat-button
                           :line-width 12
                           :color "yellow")
                    :overline "blue"
                    :underline "blue")

Result: a yellow box is displayed in tab-line, a blue overline is
displayed above of top box and a blue underline is displayed above of
bottom box.

See image step-4.png

Note: I am not sure why the underline and overline of tab-bar face are
not extended as in tab-line.  I tried many approaches (e.g. using
:extend t, using other tab-bar-* faces, tweaking tab-line-format etc)
but nothing worked for me.  Perhaps it's something related to the bug
reported here.

5) Set x-underline-at-descent-line:

(setopt x-underline-at-descent-line t)

Result: The tab-line underline is now displayed below the bottom box,
but the tab-bar underline is not affected.  I tried many approaches
(e.g.: tweaking the variables x-underline-at-descent-line,
x-use-underline-position-properties and underline-minimum-offset, using
other tab-bar-* faces etc) to make it work, but nothing worked for me.

See image step5.png


[-- Attachment #2: step-4.png --]
[-- Type: image/png, Size: 60833 bytes --]

[-- Attachment #3: step-5.png --]
[-- Type: image/png, Size: 64080 bytes --]

[-- Attachment #4: Type: text/plain, Size: 13 bytes --]


---
Gabriel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#59947: 30.0.50; Underline of tab-bar face does not respect x-underline-at-descent-line
  2022-12-10 18:22 bug#59947: 30.0.50; Underline of tab-bar face does not respect x-underline-at-descent-line Gabriel
@ 2022-12-10 19:12 ` Eli Zaretskii
  2022-12-10 19:28   ` Gabriel
  2022-12-11 17:12 ` Juri Linkov
  1 sibling, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2022-12-10 19:12 UTC (permalink / raw)
  To: Gabriel; +Cc: 59947

> From: Gabriel <gabriel376@hotmail.com>
> Date: Sat, 10 Dec 2022 15:22:20 -0300
> 
> Apparently, the underline property of tab-bar (and tab-bar-*) face does
> not respect the option x-underline-at-descent-line.  When
> x-underline-at-descent-line is set to t, the underline is displayed at
> descent level (below of bottom box), but in tab-bar face it's displayed
> at the baseline (above of bottom box).  See steps below and attached
> images for more information.

The x-underline-at-descent-line option is only supported for windows
that display buffers.  And the tab bar uses a pseudo-window that has
no buffer (like the tool bar in builds that don't have a
toolkit-provided tool bar).





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#59947: 30.0.50; Underline of tab-bar face does not respect x-underline-at-descent-line
  2022-12-10 19:12 ` Eli Zaretskii
@ 2022-12-10 19:28   ` Gabriel
  2022-12-10 19:44     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Gabriel @ 2022-12-10 19:28 UTC (permalink / raw)
  To: 59947

Eli Zaretskii <eliz@gnu.org> writes:
>
> The x-underline-at-descent-line option is only supported for windows
> that display buffers.  And the tab bar uses a pseudo-window that has
> no buffer (like the tool bar in builds that don't have a
> toolkit-provided tool bar).

Thanks for the explanation, Eli.  In this case, feel free to close this
bug report.

So it works for tab-line because it is displayed in a "real" window,
right?

---
Gabriel





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#59947: 30.0.50; Underline of tab-bar face does not respect x-underline-at-descent-line
  2022-12-10 19:28   ` Gabriel
@ 2022-12-10 19:44     ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2022-12-10 19:44 UTC (permalink / raw)
  To: Gabriel; +Cc: 59947-done

> From: Gabriel <gabriel376@hotmail.com>
> Date: Sat, 10 Dec 2022 16:28:52 -0300
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> >
> > The x-underline-at-descent-line option is only supported for windows
> > that display buffers.  And the tab bar uses a pseudo-window that has
> > no buffer (like the tool bar in builds that don't have a
> > toolkit-provided tool bar).
> 
> Thanks for the explanation, Eli.  In this case, feel free to close this
> bug report.
> 
> So it works for tab-line because it is displayed in a "real" window,
> right?

Yes.  A tab-line is similar to the mode-line and a header-line, and
uses the same display routines.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#59947: 30.0.50; Underline of tab-bar face does not respect x-underline-at-descent-line
  2022-12-10 18:22 bug#59947: 30.0.50; Underline of tab-bar face does not respect x-underline-at-descent-line Gabriel
  2022-12-10 19:12 ` Eli Zaretskii
@ 2022-12-11 17:12 ` Juri Linkov
  1 sibling, 0 replies; 5+ messages in thread
From: Juri Linkov @ 2022-12-11 17:12 UTC (permalink / raw)
  To: Gabriel; +Cc: 59947

> Note: I am not sure why the underline and overline of tab-bar face are
> not extended as in tab-line.  I tried many approaches (e.g. using
> :extend t, using other tab-bar-* faces, tweaking tab-line-format etc)
> but nothing worked for me.  Perhaps it's something related to the bug
> reported here.

To extend the tab-bar you could just add tab-bar-format-align-right
to the end of tab-bar-format.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-12-11 17:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-10 18:22 bug#59947: 30.0.50; Underline of tab-bar face does not respect x-underline-at-descent-line Gabriel
2022-12-10 19:12 ` Eli Zaretskii
2022-12-10 19:28   ` Gabriel
2022-12-10 19:44     ` Eli Zaretskii
2022-12-11 17:12 ` Juri Linkov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.