From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: Re: incorrect button highlighting Date: Thu, 20 Sep 2007 20:28:39 +0200 Message-ID: <87sl59xkbs.fsf@escher.local.home> References: <200709111721.l8BHL7Di000880@oogie-boogie.ics.uci.edu> <3sodg1olsr.fsf@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1190312982 7299 80.91.229.12 (20 Sep 2007 18:29:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Sep 2007 18:29:42 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 20 20:29:41 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IYQmS-0001IR-P4 for ged-emacs-devel@m.gmane.org; Thu, 20 Sep 2007 20:29:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IYQmQ-0001K5-O0 for ged-emacs-devel@m.gmane.org; Thu, 20 Sep 2007 14:29:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IYQlq-0000wh-OW for emacs-devel@gnu.org; Thu, 20 Sep 2007 14:29:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IYQlp-0000vh-K0 for emacs-devel@gnu.org; Thu, 20 Sep 2007 14:29:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IYQlp-0000vd-FS for emacs-devel@gnu.org; Thu, 20 Sep 2007 14:29:01 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IYQlo-0003QQ-Rw for emacs-devel@gnu.org; Thu, 20 Sep 2007 14:29:01 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IYQlf-0003yT-Vf for emacs-devel@gnu.org; Thu, 20 Sep 2007 20:28:51 +0200 Original-Received: from i577bd1f7.versanet.de ([87.123.209.247]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 20 Sep 2007 20:28:51 +0200 Original-Received: from Stephen.Berman by i577bd1f7.versanet.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 20 Sep 2007 20:28:51 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 35 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: i577bd1f7.versanet.de User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:79390 Archived-At: On Thu, 20 Sep 2007 04:05:03 -0400 Glenn Morris wrote: > Glenn Morris wrote: > >> I think this is a documented limitation of the widget library. > > Actually, it's nothing to do with widgets. This has the same symptoms: > > (progn > (switch-to-buffer "*example*") > (insert-image (create-image "prev-node.xpm") > (propertize "prev" 'mouse-face 'custom-button-pressed-face)) > (insert-image (create-image "next-node.xpm") > (propertize "next" 'mouse-face 'custom-button-pressed-face))) It appears to be due to using the same face symbol consecutively. Compare the following: (progn (copy-face 'custom-button-pressed 'copy-button-pressed) (switch-to-buffer "*example*") (insert-image (create-image "prev-node.xpm") (propertize "prev" 'mouse-face 'highlight)) (insert-image (create-image "next-node.xpm") (propertize "next" 'mouse-face 'highlight)) (insert-image (create-image "prev-node.xpm") (propertize "prev" 'mouse-face 'copy-button-pressed)) (insert-image (create-image "next-node.xpm") (propertize "next" 'mouse-face 'custom-button-pressed))) The first two images, both with the highlight face, show the problem, the second two, with different face symbols but identical face definitions, show the face independently, as they should. Steve Berman