#63 Color Dialog

development
closed-accepted
Nathan Gray
Program (79)
5
2003-03-07
2002-08-15
Nathan Gray
No

This patch against CVS HEAD adds a color dialog
to NEdit. It has some nice features:

* Ability to change text fg/bg, selection fg/bg,
highlighted fg/bg, line number color, and cursor
color.

* Instant, as-you-type validation of color names
(similar to font names in the font dialog).

* Since colors are now stored in .nedit you
can't have mismatched plain/syntax highlit colors.

* Ability to fill Default Settings -> Colors dialog
with colors from current window. (We should add
this to the font dialog too, IMO.)

There's also an enhancement of the font browser
that changes the sample display to an editable text
field with appropriate coloring. This is still buggy
though, and might not be worth the trouble.

Discussion

<< < 1 2 (Page 2 of 2)
  • Nathan Gray
    Nathan Gray
    2003-02-17

    Version 2.0 of the color dialog patch

     
    Attachments
  • Logged In: YES
    user_id=241391

    Very nice feature. I like it a lot.

    Maybe I am missing an obvious thing, but I can't see
    any color change when I play with highlighted fg/bg.
    What should it be applied to?

    Unfortunately, this patch has currently little meaning
    for Joe an average user because it lacks the GUI
    facilities of browsing the existing color database and
    viewing the current chosen color. The user still has
    to rely on external tools like xcolormap, xcolorsel
    etc. so that to make a conscious choice.

    Anyway, this is much better than nothing at all.

    W.r.t the possibility of font sample text editing,
    I personnaly don't see any application for that.

     
  • Nathan Gray
    Nathan Gray
    2003-02-17

    Logged In: YES
    user_id=121553

    &quot;Maybe I am missing an obvious thing, but I can't see
    any color change when I play with highlighted fg/bg.
    What should it be applied to?&quot;

    I think it only applies when you enable &quot;show matching&quot;.
    Internally it's called the highlighting color but that's
    probably not a good name for the dialog to use.

    I agree that it would be good to have a GUI color
    selector, and that's the next step. But we'll still need
    something like this dialog, and it can easily be extended
    to take advantage of a color browser. I still think it's a
    big step forward because the current method is
    something like:

    0. Figure out that you have to use a .Xdefaults file to
    change colors in nedit. (This is not at all obvious to a
    new user.)
    0.5 Figure out how .Xdefaults files work and how to
    make sure they get loaded when X starts. (This is not
    automatic in many Linux distros.)
    1. Figure out what valid colors exist.
    2. Try a color in .Xdefaults
    3. Run xrdb -merge .Xdefaults
    4. Start nedit
    5. See if you like the color.
    6. Quit nedit.
    7. Loop to 2 until satisfied.

    With the dialog it'd be:

    1. Find the color dialog.
    2. Figure out what colors can be used. (You can
    always use #RRGGBB after all, and the &quot;invalid color&quot;
    feedback helps when experimenting with colors.)
    3. Try a color.
    4. Hit apply.
    5. Loop to 3 until satisfied.
    6. Save preferences.

    &quot;W.r.t the possibility of font sample text editing,
    I personnaly don't see any application for that.&quot;

    The idea is that a font can look very different when
    viewed black on white than it looks as white on black.
    And to really see how a font reads you might want to
    type some actual words in it. How often do you actually
    type &quot;ABCDEFGHIJK...&quot;? Wouldn't it be more helpful to
    find out how &quot;for (i=0; i&lt;x; i++) {&quot; looks in the font?

     
  • Nathan Gray
    Nathan Gray
    2003-02-17

    Logged In: YES
    user_id=121553

    &quot;Maybe I am missing an obvious thing, but I can't see
    any color change when I play with highlighted fg/bg.
    What should it be applied to?&quot;

    I think it only applies when you enable &quot;show matching&quot;.
    Internally it's called the highlighting color but that's
    probably not a good name for the dialog to use.

    I agree that it would be good to have a GUI color
    selector, and that's the next step. But we'll still need
    something like this dialog, and it can easily be extended
    to take advantage of a color browser. I still think it's a
    big step forward because the current method is
    something like:

    0. Figure out that you have to use a .Xdefaults file to
    change colors in nedit. (This is not at all obvious to a
    new user.)
    0.5 Figure out how .Xdefaults files work and how to
    make sure they get loaded when X starts. (This is not
    automatic in many Linux distros.)
    1. Figure out what valid colors exist.
    2. Try a color in .Xdefaults
    3. Run xrdb -merge .Xdefaults
    4. Start nedit
    5. See if you like the color.
    6. Quit nedit.
    7. Loop to 2 until satisfied.

    With the dialog it'd be:

    1. Find the color dialog.
    2. Figure out what colors can be used. (You can
    always use #RRGGBB after all, and the &quot;invalid color&quot;
    feedback helps when experimenting with colors.)
    3. Try a color.
    4. Hit apply.
    5. Loop to 3 until satisfied.
    6. Save preferences.

    &quot;W.r.t the possibility of font sample text editing,
    I personnaly don't see any application for that.&quot;

    The idea is that a font can look very different when
    viewed black on white than it looks as white on black.
    And to really see how a font reads you might want to
    type some actual words in it. How often do you actually
    type &quot;ABCDEFGHIJK...&quot;? Wouldn't it be more helpful to
    find out how &quot;for (i=0; i&lt;x; i++) {&quot; looks in the font?

     
  • Nathan Gray
    Nathan Gray
    2003-03-07

    • assigned_to: nobody --> n8gray
    • status: open --> closed-accepted
     
  • Nathan Gray
    Nathan Gray
    2003-03-07

    Logged In: YES
    user_id=121553

    The patch has been applied to CVS.

     
<< < 1 2 (Page 2 of 2)