[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 23.0.60; tiny font in Customize button
From: |
Juri Linkov |
Subject: |
Re: 23.0.60; tiny font in Customize button |
Date: |
Sat, 10 May 2008 03:03:54 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) |
>> 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/
- Re: 23.0.60; tiny font in Customize button,
Juri Linkov <=