unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jan Djärv" <jan.h.d@swipnet.se>
To: Andreas Seltenreich <seltenreich@gmx.de>
Cc: david.hansen@physik.fu-berlin.de, emacs-devel@gnu.org
Subject: Re: [patch] use proper color when drawing border of non-toolkit scroll bars
Date: Fri, 02 Feb 2007 11:33:14 +0100	[thread overview]
Message-ID: <45C3136A.3090209@swipnet.se> (raw)
In-Reply-To: <87r6tdv4rs.fsf@gate450.dyndns.org>

Andreas Seltenreich skrev:
> Hi,
> 
> the border of non-toolkit scroll bars seems to ignore attempts to
> customize it via the scroll-bar-foreground frame parameter or the
> scroll-bar face.  Attached is a trivial patch to fix it, although I'm
> not really sure if it qualifies as a bug.

Applied, thanks.  FWIW, I think it is a bug.

	Jan D.

> 
> regards,
> andreas
> 
> Index: ChangeLog
> ===================================================================
> RCS file: /sources/emacs/emacs/src/ChangeLog,v
> retrieving revision 1.5527
> diff -c -0 -r1.5527 ChangeLog
> *** ChangeLog	29 Jan 2007 17:06:15 -0000	1.5527
> --- ChangeLog	29 Jan 2007 22:18:56 -0000
> ***************
> *** 0 ****
> --- 1,6 ----
> + 2007-01-29  Andreas Seltenreich  <uwi7@rz.uni-karlsruhe.de>
> + 
> + 	* xterm.c [!USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_expose): Use
> + 	the foreground color of the scroll-bar face when drawing the
> + 	scroll-bar's border.
> + 
> Index: xterm.c
> ===================================================================
> RCS file: /sources/emacs/emacs/src/xterm.c,v
> retrieving revision 1.938
> diff -c -r1.938 xterm.c
> *** xterm.c	21 Jan 2007 04:18:14 -0000	1.938
> --- xterm.c	29 Jan 2007 22:19:08 -0000
> ***************
> *** 5279,5284 ****
> --- 5279,5289 ----
>   
>     x_scroll_bar_set_handle (bar, XINT (bar->start), XINT (bar->end), 1);
>   
> +   /* Switch to scroll bar foreground color. */
> +   if (f->output_data.x->scroll_bar_foreground_pixel != -1)
> +     XSetForeground (FRAME_X_DISPLAY (f), gc,
> + 		    f->output_data.x->scroll_bar_foreground_pixel);
> + 
>     /* Draw a one-pixel border just inside the edges of the scroll bar.  */
>     XDrawRectangle (FRAME_X_DISPLAY (f), w, gc,
>   
> ***************
> *** 5287,5292 ****
> --- 5292,5302 ----
>   		  XINT (bar->width) - 1 - width_trim - width_trim,
>   		  XINT (bar->height) - 1);
>   
> +   /* Restore the foreground color of the GC if we changed it above.  */
> +   if (f->output_data.x->scroll_bar_foreground_pixel != -1)
> +     XSetForeground (FRAME_X_DISPLAY (f), gc,
> + 		    f->output_data.x->foreground_pixel);
> + 
>     UNBLOCK_INPUT;
>   
>   }
> 
> 
> 
> 
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel

      parent reply	other threads:[~2007-02-02 10:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-29 22:37 [patch] use proper color when drawing border of non-toolkit scroll bars Andreas Seltenreich
2007-01-29 22:45 ` Leo
2007-01-30 16:40   ` Andreas Seltenreich
2007-02-01 13:26 ` David Hansen
2007-02-02 10:33 ` Jan Djärv [this message]

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=45C3136A.3090209@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=david.hansen@physik.fu-berlin.de \
    --cc=emacs-devel@gnu.org \
    --cc=seltenreich@gmx.de \
    /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).