From: storm@cua.dk (Kim F. Storm)
Cc: snogglethorpe@gmail.com, emacs-devel@gnu.org, rms@gnu.org, miles@gnu.org
Subject: Re: TTY Vertical divider face?
Date: Tue, 28 Jun 2005 10:25:56 +0200 [thread overview]
Message-ID: <m31x6mhoq3.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <87slz3h0mg.fsf@jurta.org> (Juri Linkov's message of "Tue, 28 Jun 2005 02:54:15 +0300")
Juri Linkov <juri@jurta.org> writes:
>>> It makes sense to use the new `vertical-border' face not only
>>> for defining a vertical divider on character terminals, but also
>>> on X for defining the foreground color of the vertical thin line
>>> between windows.
>>>
>>> That seems natural.
>>>
>>> Is that line present even when there is a scroll bar?
>>
>> Yes.
>
> I want also to fix the problem where the vertical border steals
> 1 pixel from the text area of the right window. This makes some
> letters indistinguishable. The patch below draws the vertical border
> 1 pixel left when there are no scroll bars and no left fringes.
> These screenshots demonstrate how the vertical border looks
> before and after applying the patch:
I think we need to address this problem, and your change may work --
but what happens if the window on the left has a scroll bar on the
right?
I have been considering the following approach:
- if there are no scroll-bars, your approach is good.
- if window has a scroll-bar on the left, reduce width of
scroll-bar by one pixel, and put line on the left side of
the scroll-bar.
- if window has scroll-bar on the right, and the window
on the left of this window also has scroll-bar on right,
reduce width of other window's scroll-bar and put line
on right side of that scroll-bar.
- if window has scroll-bar on right, and window on
the left has scroll-bar on left, don't show the
vertical line (the dual scroll-bars next to each other
is enough to show which window the scroll-bars belong to).
Actually, in most cases, the scroll-bars are already a little
narrower than a full multiple of the column width, so there may
already be room for the vertical line without reducing the
scroll-bar width.
So although your change may give good results in most cases,
I think there are cases where it may fail (if you happen to
move the vertical line into an area occupied by a scroll bar...
>
>
>
>
>
>
> Index: src/xdisp.c
> ===================================================================
> RCS file: /cvsroot/emacs/emacs/src/xdisp.c,v
> retrieving revision 1.1028
> diff -c -r1.1028 xdisp.c
> *** src/xdisp.c 25 Jun 2005 22:35:42 -0000 1.1028
> --- src/xdisp.c 27 Jun 2005 23:11:18 -0000
> ***************
> *** 22400,22405 ****
> --- 22400,22408 ----
> window_box_edges (w, -1, &x0, &y0, &x1, &y1);
> y1 -= 1;
>
> + if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0)
> + x1 -= 1;
> +
> rif->draw_vertical_window_border (w, x1, y0, y1);
> }
> else if (!WINDOW_LEFTMOST_P (w)
> ***************
> *** 22410,22415 ****
> --- 22413,22421 ----
> window_box_edges (w, -1, &x0, &y0, &x1, &y1);
> y1 -= 1;
>
> + if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0)
> + x0 -= 1;
> +
> rif->draw_vertical_window_border (w, x0, y0, y1);
> }
> }
>
> --
> Juri Linkov
> http://www.jurta.org/emacs/
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
next prev parent reply other threads:[~2005-06-28 8:25 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-30 2:41 TTY Vertical divider face? Len Trigg
2005-05-31 21:50 ` Len Trigg
2005-06-06 13:27 ` Juri Linkov
2005-06-07 5:12 ` Miles Bader
2005-06-07 15:03 ` Juri Linkov
2005-06-07 23:00 ` Miles Bader
2005-06-08 12:02 ` Richard Stallman
2005-06-08 20:32 ` Juri Linkov
2005-06-14 22:31 ` Richard Stallman
2005-06-18 13:59 ` Juri Linkov
2005-06-19 3:51 ` Richard Stallman
2005-06-20 9:09 ` Miles Bader
2005-06-20 10:14 ` Miles Bader
2005-06-20 10:48 ` Miles Bader
2005-06-20 15:06 ` Johan Bockgård
2005-06-21 0:11 ` Miles Bader
2005-06-21 0:21 ` Miles Bader
2005-06-21 15:13 ` Richard M. Stallman
2005-06-21 16:29 ` Juri Linkov
2005-06-22 0:21 ` Miles Bader
2005-06-22 13:03 ` Juri Linkov
2005-06-23 0:54 ` Richard M. Stallman
2005-06-23 7:48 ` Kim F. Storm
2005-06-27 23:54 ` Juri Linkov
2005-06-28 8:25 ` Kim F. Storm [this message]
2005-06-28 23:54 ` Juri Linkov
2005-06-29 9:12 ` Kim F. Storm
2005-06-28 18:47 ` Richard M. Stallman
2005-06-27 23:54 ` Juri Linkov
2005-06-28 8:29 ` Kim F. Storm
2005-06-28 23:54 ` Juri Linkov
2005-06-29 9:02 ` Kim F. Storm
2005-06-28 18:47 ` Richard M. Stallman
2005-07-02 0:54 ` David Hunter
2005-07-02 10:53 ` Eli Zaretskii
2005-06-21 22:59 ` Richard M. Stallman
2005-06-22 0:02 ` Miles Bader
2005-06-21 2:00 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m31x6mhoq3.fsf@kfs-l.imdomain.dk \
--to=storm@cua.dk \
--cc=emacs-devel@gnu.org \
--cc=miles@gnu.org \
--cc=rms@gnu.org \
--cc=snogglethorpe@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).