From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: 23.0.60; tiny font in Customize button Date: Sat, 10 May 2008 03:03:54 +0300 Organization: JURTA Message-ID: <87iqxn3t2d.fsf@jurta.org> References: <000001c8a28b$cb3e22e0$0200a8c0@us.oracle.com> <878wz8umix.fsf@jurta.org> <87fxtgrr3t.fsf@stupidchicken.com> <87zlro5591.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1210379539 2514 80.91.229.12 (10 May 2008 00:32:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 10 May 2008 00:32:19 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, Stefan Monnier , Drew Adams To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 10 02:32:54 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jud1B-00029i-H3 for ged-emacs-devel@m.gmane.org; Sat, 10 May 2008 02:32:53 +0200 Original-Received: from localhost ([127.0.0.1]:44343 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jud0T-0002lD-5N for ged-emacs-devel@m.gmane.org; Fri, 09 May 2008 20:32:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JucyW-0001MP-1L for emacs-devel@gnu.org; Fri, 09 May 2008 20:30:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JucyT-0001Jz-JU for emacs-devel@gnu.org; Fri, 09 May 2008 20:30:07 -0400 Original-Received: from [199.232.76.173] (port=49854 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JucyT-0001Jl-7S for emacs-devel@gnu.org; Fri, 09 May 2008 20:30:05 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:41619) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JucyR-0004t2-Nt for emacs-devel@gnu.org; Fri, 09 May 2008 20:30:04 -0400 Original-Received: from mail.gnu.org ([199.232.76.166]:44231 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1Jucxf-0002LV-Rt for emacs-pretest-bug@gnu.org; Fri, 09 May 2008 20:29:15 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JucyM-0004rl-GY for emacs-pretest-bug@gnu.org; Fri, 09 May 2008 20:30:02 -0400 Original-Received: from relay02.kiev.sovam.com ([62.64.120.197]:58457) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JucyL-0004rU-KM for emacs-pretest-bug@gnu.org; Fri, 09 May 2008 20:29:58 -0400 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay02.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1JucyJ-000PS8-M9; Sat, 10 May 2008 03:29:55 +0300 In-Reply-To: <87zlro5591.fsf@stupidchicken.com> (Chong Yidong's message of "Sun, 20 Apr 2008 22:08:42 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) X-Scanner-Signature: ebef06da57613c13a9510a9a5e517e93 X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Not Detected X-SpamTest-Info: Profiles 2798 [May 08 2008] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: none X-SpamTest-Rate: 10 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0278], KAS30/Release X-detected-kernel: by monty-python.gnu.org: FreeBSD 6.x (1) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:96913 gmane.emacs.pretest.bugs:22241 Archived-At: >> Could we use one of those triangles that either points rightward >> (closed/hidden/folded) or downward (open/shown/unfolded)? > > It's certainly doable, assuming someone is up for some widget hackery. > (The `checkbox' widget in wid-edit.el is probably a good starting point; > in this case, the checkbox is implemented as a Lisp string that defines > an xbm image. A similar method is used in startup.el for the "Don't > show this again" checkbox.) I now realized that everything is already in place. We just need to put necessary image files to the etc/custom directory. This is due to existing code in `widget-visibility-value-create': (if (widget-value widget) (widget-image-insert widget on "down" "down-pushed") (widget-image-insert widget off "right" "right-pushed")) where strings are image file names for triangle arrows for collapsed/expanded positions. I propose to use the following imagery: down.xpm: /* XPM */ static char *down[] = { "10 10 4 1", " c none", ". c gray90", "X c gray45", "O c gray75", " ", "........XX", " ..OOOOXX ", " ..OOOOXX ", " ..OOXX ", " ..OOXX ", " ..XX ", " ..XX ", " .X ", " .X "}; down-pushed.xpm: /* XPM */ static char *down_pushed[] = { "10 10 4 1", " c none", ". c gray45", "X c gray90", "O c gray75", " ", "........XX", " ..OOOOXX ", " ..OOOOXX ", " ..OOXX ", " ..OOXX ", " ..XX ", " ..XX ", " .X ", " .X "}; right.xpm: /* XPM */ static char *right[] = { "10 10 4 1", " c none", ". c gray90", "X c gray45", "O c gray75", ".. ", ".... ", "...... ", "..OO.... ", "..OOOO....", "..OOOOXXXX", "..OOXXXX ", "..XXXX ", ".XXX ", ".X "}; right-pushed.xpm: /* XPM */ static char *right_pushed[] = { "10 10 4 1", " c none", ". c gray45", "X c gray90", "O c gray75", ".. ", ".... ", "...... ", "..OO.... ", "..OOOO....", "..OOOOXXXX", "..OOXXXX ", "..XXXX ", ".XXX ", ".X "}; Also I think that instead of using etc/custom directory it would be better to put custom image files to etc/images/custom: Index: lisp/wid-edit.el =================================================================== RCS file: /sources/emacs/emacs/lisp/wid-edit.el,v retrieving revision 1.191 diff -u -r1.191 wid-edit.el --- lisp/wid-edit.el 6 May 2008 07:57:59 -0000 1.191 +++ lisp/wid-edit.el 10 May 2008 00:03:34 -0000 @@ -599,7 +599,7 @@ ;;; Images. (defcustom widget-image-directory (file-name-as-directory - (expand-file-name "custom" data-directory)) + (expand-file-name "images/custom" data-directory)) "Where widget button images are located. If this variable is nil, widget will try to locate the directory automatically." -- Juri Linkov http://www.jurta.org/emacs/