[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: facemenu-unlisted-faces

From: Drew Adams
Subject: RE: facemenu-unlisted-faces
Date: Mon, 3 Jul 2006 09:48:50 -0700

    >> A simple, quick menu for bold, italic, underline, and a few simple
    >> foreground colors would be useful.

    This idea is more relevant for the "Foreground Color" and "Background
    Color" submenus of "Text Properties", which currently are populated
    only by the entry "Other" (which prompts you to enter a color name).

Yes, the uses we're talking about here involve applying a color, or a style
such as boldness or underlining, to buffer text. They don't really involve
faces. Users making text bold, or removing boldness from text, should not
have to think in terms of the "bold" and "default" faces - they should think
only in terms of text properties.

And yes, the fact that the current submenus Foreground Color and Background
Color have only the entry Other... is a hint that they are not needed.

Why not combine the three current menus, Faces, Foreground Color, and
Background Color, as well as the current menu items Display Colors and
Display Faces, as follows:

 Text Properties

   Style > Bold
   Color > Red
           Green (and so on)
           Background > Red
                        Green (and so on)

Make Background a submenu of Color, since this kind of quick color
application is generally for foreground only.

We could also choose to provide a different set of basic-color choices for
the background - e.g. pastel highlighters instead of saturated colors. The
sets (foreground, background) of basic-color choices could be determined
automatically, based on the background mode (light, dark), and it could be
user-configurable (use your favorite 20 foreground and background colors).

We could discuss whether there should be a Style submenu or we should just
put Bold, Italic, and Underline in the top-level menu. I'd rather see a
submenu used, but also have a tool-bar button for each style (common in many

"(and so on)" would not be in the menu - I use it here for brevity. Each of
the small set of basic colors would appear explicitly as a menu item: Red,
Green, Blue, Yellow, Magenta, Cyan, Black, White,... We would need about 20
easily recognizable color names.

I've shown the basic color choices as a menu here, not as a palette. I would
rather see Color not as a submenu but as a Color... menu item that brings up
a tiny palette of, say, 20 basic colors, with swatches instead of names (but
tooltips for the names). This palette would have a Background checkbox. No
Color menu, no Background menu. We could decide whether checking the
Background box would change the basic-color choices to a set of highlighters
(IMO: yes).

"Other..." would replace today's top-level Display Colors item. Like my
suggestion for Display Faces, this display would be active, so you could
click a color to apply it to the selected text. Other... would show a
complete list of all named colors - an extension of the small set of colors
available in the menu/palette individually. Or, it could open a complete
color editor, a la my library palette.el (the concept, not the

If we used a Color... menu item instead of a Color submenu, then Other...
would be a button on the palette. The Background checkbox on the palette
would also apply to whatever color you choose using Other... In this case,
the top-level menu would have only three menu items (for the stuff discussed
here): Style, Color..., and Face... - no submenus except Style.

Face... would replace today's top-level Display Faces item. It would do what
I described previously - you could click a face to apply it to the selected
text (just as you apply a foreground color). This would be the only place
where faces would be chosen as such - the style and color items would apply
text properties, not faces.

Bold, Italic, and Underline (in the Style menu) would be checkbox-toggle
menu items. You could thus combine style attributes (e.g. bold plus italic).
If you clicked Bold for a selection of text that was already bold, then it
would become unbold (and the check mark would go away). This is standard
behavior in many GUIs.

Each style (Bold, Italic, and Underline), would also be available as a
tool-bar button. The pressed/unpressed appearance of each button would
indicate the state of the selected text at all times (e.g. Bold pressed for
bold text).

The mini-palette (20 colors, plus an Other... button) would also be
available via a toolbar button, providing the more typical access (e.g. the
colored `A' button in Word and Outlook).

    > One problem with mere swatches is that a non-trivial part of the male
    > population (typical programmer's sex) is color-blind in some respect.
    > If those swatches are used for more than coloring the person's
    > personal screen (namely if colors may persist), then picking colors
    > judiciously necessitates seeing their names for such people.

    The standard way that graphical programs get round this is to add a
    little colored box next to the color name.  However, I don't know of a
    simple way to do this valid for all the toolkits Emacs runs on
    (e.g. text properties don't show up in GTK menus.)  Probably someone
    can look into this after the release.

A simple way to do this would be to pop open a tiny frame with color
swatches. I do this with my palette code, for instance. I use 10,000 colors,
so 10-20 colors won't be a problem - just use a space character or two with
the swatch color as its background. IOW, don't think "menu", think "palette
buffer" - no toolkit problems and a better UI.

Wrt name vs name+swatch vs swatch, whether in a menu or not:

There is truly no need for color names (except in tooltips, for
accessibility). Swatches (only) are appropriate for this. The point here is
to offer multiple colors in a small space, and let users pick by appearance.
We are not talking about faces here, but colors, and using color names for a
set of 20 colors is silly.

After Waiting for Godot, of course.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]