[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TTY Vertical divider face?
From: |
Kim F. Storm |
Subject: |
Re: TTY Vertical divider face? |
Date: |
Tue, 28 Jun 2005 10:25:56 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Juri Linkov <address@hidden> 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 <address@hidden> http://www.cua.dk
- Re: TTY Vertical divider face?, (continued)
- Re: TTY Vertical divider face?, Miles Bader, 2005/06/21
- Re: TTY Vertical divider face?, Juri Linkov, 2005/06/22
- Re: TTY Vertical divider face?, Richard M. Stallman, 2005/06/22
- Re: TTY Vertical divider face?, Kim F. Storm, 2005/06/23
- Re: TTY Vertical divider face?, Juri Linkov, 2005/06/27
- Re: TTY Vertical divider face?, Kim F. Storm, 2005/06/28
- Re: TTY Vertical divider face?, Juri Linkov, 2005/06/28
- Re: TTY Vertical divider face?, Kim F. Storm, 2005/06/29
- Re: TTY Vertical divider face?, Richard M. Stallman, 2005/06/28
- Re: TTY Vertical divider face?, Juri Linkov, 2005/06/27
- Re: TTY Vertical divider face?,
Kim F. Storm <=
- Re: TTY Vertical divider face?, Juri Linkov, 2005/06/28
- Re: TTY Vertical divider face?, Kim F. Storm, 2005/06/29
- Re: TTY Vertical divider face?, Richard M. Stallman, 2005/06/28
- Re: TTY Vertical divider face?, Richard M. Stallman, 2005/06/21
- Re: TTY Vertical divider face?, Miles Bader, 2005/06/21
- Re: TTY Vertical divider face?, Richard Stallman, 2005/06/20