emacs-devel
[Top][All Lists]
Advanced

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

Re: TTY Vertical divider face?


From: Juri Linkov
Subject: Re: TTY Vertical divider face?
Date: Tue, 28 Jun 2005 02:54:45 +0300
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

>>     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.

What about such a patch?  I have tested it on GNU/Linux, but the
change in w32term.c is untested.  I hope someone will test it
on Windows.

Index: src/xterm.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xterm.c,v
retrieving revision 1.867
diff -c -r1.867 xterm.c
*** src/xterm.c 6 Jun 2005 21:27:50 -0000       1.867
--- src/xterm.c 27 Jun 2005 23:09:09 -0000
***************
*** 535,540 ****
--- 535,546 ----
       int x, y0, y1;
  {
    struct frame *f = XFRAME (WINDOW_FRAME (w));
+   struct face *face;
+ 
+   face = FACE_FROM_ID (f, VERTICAL_BORDER_FACE_ID);
+   if (face)
+     XSetForeground (FRAME_X_DISPLAY (f), f->output_data.x->normal_gc,
+                   face->foreground);
  
    XDrawLine (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
             f->output_data.x->normal_gc, x, y0, x, y1);

Index: src/w32term.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/w32term.c,v
retrieving revision 1.225
diff -c -r1.225 w32term.c
*** src/w32term.c       13 Jun 2005 12:18:31 -0000      1.225
--- src/w32term.c       27 Jun 2005 23:09:09 -0000
***************
*** 507,512 ****
--- 507,513 ----
    struct frame *f = XFRAME (WINDOW_FRAME (w));
    RECT r;
    HDC hdc;
+   struct face *face;
  
    r.left = x;
    r.right = x + 1;
***************
*** 514,520 ****
    r.bottom = y1;
  
    hdc = get_frame_dc (f);
!   w32_fill_rect (f, hdc, FRAME_FOREGROUND_PIXEL (f), &r);
    release_frame_dc (f, hdc);
  }
  
--- 515,526 ----
    r.bottom = y1;
  
    hdc = get_frame_dc (f);
!   face = FACE_FROM_ID (f, VERTICAL_BORDER_FACE_ID);
!   if (face)
!     w32_fill_rect (f, hdc, face->foreground, &r);
!   else
!     w32_fill_rect (f, hdc, FRAME_FOREGROUND_PIXEL (f), &r);
! 
    release_frame_dc (f, hdc);
  }
  

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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