#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 1 of 2)
  • Nathan Gray
    Nathan Gray
    2002-08-15

    Version 1.0 of the color dialog patch

     
    Attachments
  • Nathan Gray
    Nathan Gray
    2002-08-15

    Logged In: YES
    user_id=121553

    I would be grateful if somebody who understands
    allocating X
    colors would look at my uses of AllocColor and tell me if
    I'm wasting server resources in a horrible way. Other
    than that I don't think there's anything complicated
    about this patch.

     
  • Nathan Gray
    Nathan Gray
    2002-08-17

    Snapshot of the color dialog.

     
    Attachments
  • Nathan Gray
    Nathan Gray
    2002-08-17

    Logged In: YES
    user_id=121553

    Adding a screenshot...

     
  • Nathan Gray
    Nathan Gray
    2002-08-17

    Snapshot of the default settings color dialog

     
  • Nathan Gray
    Nathan Gray
    2002-08-17

    Logged In: YES
    user_id=121553

     
  • Nathan Gray
    Nathan Gray
    2002-12-05

    Logged In: YES
    user_id=121553

    Another screenshot, this time with some colors actually
    changed. :^)

     
  • Nathan Gray
    Nathan Gray
    2002-12-05

    Look! The colors change!

     
  • TK Soh
    TK Soh
    2002-12-06

    Logged In: YES
    user_id=411637

    I only tried it for few minutes just now, but very nice
    feature indeed. I think all other resources should have
    similar dialogs :-)

    One problem I noticed: it didn't pickup my overriding
    resource, neither through .Xdefaults nor -xrm.

     
  • Nathan Gray
    Nathan Gray
    2003-02-17

    Logged In: YES
    user_id=121553

    I just added a new patch that is up-to-date with current
    CVS. I've also fixed all issues I was aware of with the
    font browser enhancement, so I think this version is
    ready to go. If somebody could hammer on it a bit
    though I'd be pleased.

    TK: The reason it didn't use your resources is that the
    resources have changed from text widget resources to
    application resources that live in the .nedit file. So
    where you used to have "nedit*text.foreground" in
    .Xdefaults you now have "nedit.textFgColor" in .nedit.
    These are the new resources:
    nedit.textFgColor
    nedit.textBgColor
    nedit.selectFgColor
    nedit.selectBgColor
    nedit.hiliteFgColor
    nedit.hiliteBgColor
    nedit.lineNoFgColor
    nedit.cursorFgColor

    You can still override them from the command line or a
    .Xdefaults if you wish.

     
1 2 > >> (Page 1 of 2)