emacs-devel
[Top][All Lists]
Advanced

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

Re: incorrect button highlighting


From: Stephen Berman
Subject: Re: incorrect button highlighting
Date: Thu, 20 Sep 2007 20:28:39 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

On Thu, 20 Sep 2007 04:05:03 -0400 Glenn Morris <address@hidden> 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





reply via email to

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