* [patch] use proper color when drawing border of non-toolkit scroll bars
@ 2007-01-29 22:37 Andreas Seltenreich
2007-01-29 22:45 ` Leo
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Andreas Seltenreich @ 2007-01-29 22:37 UTC (permalink / raw)
To: emacs-devel; +Cc: david.hansen
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.
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;
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] use proper color when drawing border of non-toolkit scroll bars
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
2 siblings, 1 reply; 5+ messages in thread
From: Leo @ 2007-01-29 22:45 UTC (permalink / raw)
To: emacs-devel
> 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.
Can this patch fix this bug:
<http://permalink.gmane.org/gmane.emacs.pretest.bugs/16450>
--
Leo <sdl.web AT gmail.com> (GPG Key: 9283AA3F)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] use proper color when drawing border of non-toolkit scroll bars
2007-01-29 22:45 ` Leo
@ 2007-01-30 16:40 ` Andreas Seltenreich
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Seltenreich @ 2007-01-30 16:40 UTC (permalink / raw)
To: emacs-devel
Leo writes:
>> 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.
>
> Can this patch fix this bug:
>
> <http://permalink.gmane.org/gmane.emacs.pretest.bugs/16450>
I can't imagine a way how a call to XSetForeground() could affect
those symptoms.
regards,
andreas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] use proper color when drawing border of non-toolkit scroll bars
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-02-01 13:26 ` David Hansen
2007-02-02 10:33 ` Jan Djärv
2 siblings, 0 replies; 5+ messages in thread
From: David Hansen @ 2007-02-01 13:26 UTC (permalink / raw)
To: emacs-devel
On Mon, 29 Jan 2007 23:37:11 +0100 Andreas Seltenreich wrote:
> 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.
Please someone apply it. It's just a few lines and looks so much
better.
David
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] use proper color when drawing border of non-toolkit scroll bars
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-02-01 13:26 ` David Hansen
@ 2007-02-02 10:33 ` Jan Djärv
2 siblings, 0 replies; 5+ messages in thread
From: Jan Djärv @ 2007-02-02 10:33 UTC (permalink / raw)
To: Andreas Seltenreich; +Cc: david.hansen, emacs-devel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-02-02 10:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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.