From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Customize interface: The use of "boxed" buttons Date: 07 Jun 2004 11:29:02 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1086600560 2172 80.91.224.253 (7 Jun 2004 09:29:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 7 Jun 2004 09:29:20 +0000 (UTC) Cc: Per Abrahamsen , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Jun 07 11:29:11 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BXGRL-0006qC-00 for ; Mon, 07 Jun 2004 11:29:11 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BXGRL-0001K9-00 for ; Mon, 07 Jun 2004 11:29:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BXGRr-0007Cl-MH for emacs-devel@quimby.gnus.org; Mon, 07 Jun 2004 05:29:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BXGRj-0007BF-Lh for emacs-devel@gnu.org; Mon, 07 Jun 2004 05:29:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BXGRh-00079l-PR for emacs-devel@gnu.org; Mon, 07 Jun 2004 05:29:35 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BXGRh-00079P-Nj for emacs-devel@gnu.org; Mon, 07 Jun 2004 05:29:33 -0400 Original-Received: from [212.88.64.25] (helo=mail-relay.sonofon.dk) by monty-python.gnu.org with smtp (Exim 4.34) id 1BXGR1-0006VW-Hn for emacs-devel@gnu.org; Mon, 07 Jun 2004 05:28:52 -0400 Original-Received: (qmail 61756 invoked from network); 7 Jun 2004 09:28:50 -0000 Original-Received: from unknown (HELO kfs-l.imdomain.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 7 Jun 2004 09:28:50 -0000 Original-To: rms@gnu.org In-Reply-To: Original-Lines: 44 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:24653 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:24653 Richard Stallman 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 http://www.cua.dk