unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: emacs-pretest-bug@gnu.org,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	Drew Adams <drew.adams@oracle.com>
Subject: Re: 23.0.60; tiny font in Customize button
Date: Sat, 10 May 2008 03:03:54 +0300	[thread overview]
Message-ID: <87iqxn3t2d.fsf@jurta.org> (raw)
In-Reply-To: <87zlro5591.fsf@stupidchicken.com> (Chong Yidong's message of "Sun, 20 Apr 2008 22:08:42 -0400")

>> 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/




  reply	other threads:[~2008-05-10  0:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-20  2:11 23.0.60; tiny font in Customize button Drew Adams
2008-04-20 23:56 ` Juri Linkov
2008-04-21  0:18   ` Drew Adams
2008-04-21  0:25   ` Chong Yidong
2008-04-21  1:07     ` Stefan Monnier
2008-04-21  1:35       ` Drew Adams
2008-04-21  2:08       ` Chong Yidong
2008-05-10  0:03         ` Juri Linkov [this message]
2008-05-10  4:01           ` Chong Yidong
2008-04-21  1:35     ` Drew Adams
2008-04-21  0:30   ` Lennart Borgman (gmail)
2008-04-21  2:04     ` Chong Yidong
2008-04-21 22:16       ` Juri Linkov

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=87iqxn3t2d.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=cyd@stupidchicken.com \
    --cc=drew.adams@oracle.com \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).