|
From: | Riccardo Mottola |
Subject: | Re: Arrow of NSMenu |
Date: | Mon, 08 Apr 2013 12:16:53 +0200 |
User-agent: | Mozilla/5.0 (X11; NetBSD i386; rv:17.0) Gecko/20130221 Thunderbird/17.0.2 |
Hi Eric, thanks for looking at this again. On 04/06/13 21:51, Eric Wasylishen wrote:
If I modify manually my theme by adding the Image in the ThemeImages resources, it works now fine, i t loads and unloads perfectly and the menu gets updated. Very nice!I committed a more radical redesign that is much cleaner, I think. Pasting my changelog comment: I removed the step in theme activation where we call +[NSImage _setImagePath:name:] on each image in the theme, and instead modified +[NSImage _pathForImageNamed:] to also search the theme images directory. When a GSTheme activates now, it only calls +[NSImage _reloadCachedImages] which checks all NSImage cached by name and reloads any whose path has changed.
When i try to change the theme in Thematic I get a crash, but I will open a separate thread, I still am unsure if it is a Thematic bug (but I don't see how this is image is treated differently there) or a problem with the new change, for sure it did nto happen before (but it did not work either).
The Windows theme was already broken since months and it did not load images at all, I will test it though soon.My only worry is whether this will break the GTK or windows themes. IIRC they replace the NSImage class and override +imageNamed:, so I think they'll still work.
Riccardo
[Prev in Thread] | Current Thread | [Next in Thread] |