[Top][All Lists]
[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
Re: incorrect button highlighting, Stefan Monnier, 2007/09/20