diff options
author | Kevin Walzer <kw@codebykevin.com> | 2012-02-22 22:58:19 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2012-02-22 22:58:19 (GMT) |
commit | 9c889def7246e422c1eb98aa2e5e9e7e66298d44 (patch) | |
tree | de7ac26bd91d800ecba2dca0aa0539a1a44b20d3 /macosx/tkMacOSXColor.c | |
parent | 57b1224d0740ffbd5208457481ca421450bd6748 (diff) | |
download | tk-9c889def7246e422c1eb98aa2e5e9e7e66298d44.zip tk-9c889def7246e422c1eb98aa2e5e9e7e66298d44.tar.gz tk-9c889def7246e422c1eb98aa2e5e9e7e66298d44.tar.bz2 |
Patch for font metrics and colorspace provided by Adrian Robert
Diffstat (limited to 'macosx/tkMacOSXColor.c')
-rw-r--r-- | macosx/tkMacOSXColor.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c index ebbaec2..82ed9f8 100644 --- a/macosx/tkMacOSXColor.c +++ b/macosx/tkMacOSXColor.c @@ -266,13 +266,15 @@ GetThemeColor( break; } - *c = CGColorCreateGenericRGB(rgba[0], rgba[1], rgba[2], rgba[3]); + // this attempts to find something roughly fitting for any display +// *c = CGColorCreateGenericRGB(rgba[0], rgba[1], rgba[2], rgba[3]); - /*static CGColorSpaceRef deviceRGBSpace = NULL; + // may be off for non-main display but in most cases better than prev + static CGColorSpaceRef deviceRGBSpace = NULL; if (!deviceRGBSpace) { deviceRGBSpace = CGDisplayCopyColorSpace(CGMainDisplayID()); } - *c = CGColorCreate(deviceRGBSpace, rgba );*/ + *c = CGColorCreate(deviceRGBSpace, rgba ); } return err; } |