discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Color settings


From: Dennis Leeuw
Subject: Re: Color settings
Date: Tue, 23 Nov 2004 11:37:03 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5

Fred Kiefer wrote:
Dennis Leeuw wrote:


Is there a way to control the colors with the predefined colors, something like:
defaults write NSGlobalDomain controlColor darkGrey
And of this one I am sure that it doesn't work :)


I am not really sure if I like the idea or not, but it kept me thinking. And yes it would be easyly doable (If you accept to switch to American instead of British English :-))

We could just add a few lines into [NSColor colorFromString:], when everything else fails, to test if the given string (after adding "Color" to it) is a class method of NSColor and than call this and return the result.

But what I would like more is to have another colour list, with well know named colours and to just reference this in the default setting.

defaults write NSGlobalDomain controlColor \ {"ColorSpace"="NSNamedColorSpace"; "Catalog"="Named"; \ "Color"="darkGray"; }

Could you live with this solution as well? The benefit is that we don't need to add any code that needs maintenance.

Hi Fred,

To be honest I am playing dumb user just to find out what works and what doesn't. It seems like setting the color with darkGrey or darkGreyColor doesn't work. Maybe it is just me expecting names to work :)

To respond on your ideas, I can imagine from a code point of view that you like the last one best. From a users point of view (but when we have a decent defaults.app/Preferences.app this might be overkill) I could imagine localizeable names for colors and a way to use them with the defaults command. But then again, how much code do you want to add to make a system userfriendly when an app can solve the problem...

So I guess leave it at it's current state... I will document that you can't use names with the defaults command and after 1.0.0 is released maybe we should think about it again.... ;)

Just a thought.

Dennis



--
You must learn from the mistakes of others. You can't possibly live long enough to make them all yourself.
                        --- Sam Levenson




reply via email to

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