unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: Per Abrahamsen <abraham@dina.kvl.dk>, emacs-devel@gnu.org
Subject: Re: Customize interface: The use of "boxed" buttons
Date: 07 Jun 2004 11:29:02 +0200	[thread overview]
Message-ID: <m31xkr67j5.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <E1BXEHi-0005dN-A1@fencepost.gnu.org>

Richard Stallman <rms@gnu.org> writes:

>     > How would you suggest implementing a look for pressed and unpressed
>     > buttons?
> 
>     The look is fine, it is how it is used.  The pressed button look is,
>     in other GUI's, used when the button is pressed, i.e. on mouse-down
>     not on mouse-over.
> 
> So you're saying that simply removing the mouse-face would make
> it better?
> 
>     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:


*** wid-edit.el	20 May 2004 00:13:17 +0200	1.127
--- wid-edit.el	07 Jun 2004 11:27:26 +0200	
***************
*** 386,392 ****
      ;; 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)
--- 386,392 ----
      ;; 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 <storm@cua.dk> http://www.cua.dk

  parent reply	other threads:[~2004-06-07  9:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-05 14:12 Customize interface: The use of "boxed" buttons Per Abrahamsen
2004-06-05 22:26 ` Miles Bader
2004-06-06 14:47   ` Per Abrahamsen
2004-06-06 20:55     ` Miles Bader
2004-06-07  7:24       ` Per Abrahamsen
2004-06-07  7:36         ` Miles Bader
2004-06-07  7:10     ` Richard Stallman
2004-06-06 14:31 ` Richard Stallman
2004-06-06 14:53   ` Per Abrahamsen
2004-06-06 17:14     ` Paul Pogonyshev
2004-06-07  7:11     ` Richard Stallman
2004-06-07  7:39       ` Per Abrahamsen
2004-06-07  7:46         ` Miles Bader
2004-06-08 20:31           ` Richard Stallman
2004-06-07  9:29       ` Kim F. Storm [this message]
2004-06-07 23:27         ` Kim F. Storm
2004-06-08  6:41           ` David Kastrup
2004-06-08  8:09             ` Kim F. Storm
2004-06-08  8:26               ` David Kastrup
2004-06-08  9:30           ` Per Abrahamsen
2004-06-06 15:17 ` Per Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m31xkr67j5.fsf@kfs-l.imdomain.dk \
    --to=storm@cua.dk \
    --cc=abraham@dina.kvl.dk \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).