emacs-devel
[Top][All Lists]
Advanced

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

Re: Customize interface: The use of "boxed" buttons


From: Kim F. Storm
Subject: Re: Customize interface: The use of "boxed" buttons
Date: 08 Jun 2004 01:27:17 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

address@hidden (Kim F. Storm) writes:

> >     A change in mouse cursor type when the mouse is over a button is more
> >     common in other application.
> > 
> > Emacs has no facility for that, but it might not be too hard to add one
> > by modifying the code that now does mouse highlighting.
> 
> Emacs HAS the facility to do that -- using a pointer property.
> Try the following patch:

Actually, the following patch works better, as it also changes
the pointer shape over images (like checkboxes):


*** wid-edit.el 20 May 2004 00:13:17 +0200      1.127
--- wid-edit.el 08 Jun 2004 01:23:34 +0200      
***************
*** 385,392 ****
      (overlay-put overlay 'evaporate t)
      ;; We want to avoid the face with image buttons.
      (unless (widget-get widget :suppress-face)
!       (overlay-put overlay 'face (widget-apply widget :button-face-get))
!       (overlay-put overlay 'mouse-face widget-mouse-face))
      (overlay-put overlay 'help-echo help-echo)))
  
  (defun widget-mouse-help (window overlay point)
--- 385,392 ----
      (overlay-put overlay 'evaporate t)
      ;; We want to avoid the face with image buttons.
      (unless (widget-get widget :suppress-face)
!       (overlay-put overlay 'face (widget-apply widget :button-face-get)))
!     (overlay-put overlay 'pointer 'hand)
      (overlay-put overlay 'help-echo help-echo)))
  
  (defun widget-mouse-help (window overlay point)

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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