|
From: | Christopher Armstrong |
Subject: | Re: gnustep on windows |
Date: | Tue, 4 Mar 2008 10:41:22 +1100 |
Hi Fred On 04/03/2008, at 7:06 AM, Fred Kiefer wrote:
Just one comment on this impressive patch. You seem to override some system colour methods on NSColor to use the Windows colour settings inGNUstep. This is the wrong approach to do so. You should be generating anew system colour list and send that via the themeDidActivate notification of your theme. That way even system colours loaded from a NIB file would be displayed correctly. All you have to do is create the list: list = [[NSColorList alloc] initWithName: @"System"]; and to add your colours to it: [list setColor: Win32ToGSColor(COLOR_WINDOWTEXT) forKey: @"controlTextColor"];
Thanks, this looks like just what I was looking for. I know what I was doing was a hack but I wasn't sure about the way around it.
Also, I'm not sure what patch version you have but I was thinking of introducing another theme notification called GSThemeDidUpdate or the like, which is sent the first time a theme is updated, or by a theme whenever it changes its appearance and requires widgets to be updated. Another alternative is sending GSThemeDidActivate every time a theme needs to update its appearance. This is even if the theme itself does not change but needs to change what it looks like. It is necessary, because Windows uxtheme (or a similar adapted theme engine) could undergo a theme change, and we would need to update our appearance.
Christopher Armstrong address@hidden
[Prev in Thread] | Current Thread | [Next in Thread] |