gnustep-dev
[Top][All Lists]
Advanced

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

Re: GNUstep's GTK theme now changes when user selects a new theme...


From: Eric Wasylishen
Subject: Re: GNUstep's GTK theme now changes when user selects a new theme...
Date: Tue, 6 Mar 2012 01:34:05 -0700

Hi Greg,
I think I fixed the problem.. the GTK theme was forgetting to remove the 
existing slider/radio/switch images by calling -setName: nil, so the 
replacement images weren't being registered since [NSImage setName:] does 
nothing if the name is already in use.

In the longer term I'd like to come up with a more clearly defined API on 
NSImage for updating system images programatically. Currently GSTheme uses the 
+_setImagePath:name: method used when loading image files in theme bundles.

Maybe something like:

+[NSImage registerThemeImage: (NSImage *)anImageGeneratedByTheTheme
                         forName: (NSString *)aName];

This could use the same type of trick that +_setImagePath:name: does of reusing 
the existing registered NSImage instance, removing all of its reps, and copying 
in the reps from anImageGeneratedByTheTheme.

Eric

On 2012-03-05, at 11:07 PM, Gregory Casamento wrote:

> I recently made changes so that GNUstep's GTK theme now changes when
> user selects a new theme.
> 
> There's one problem, though...  It seems like the buttons for the
> sliders, the switch and the radio buttons don't update when the theme
> is changed.  For some reason these images are not reloaded (even
> though they are surely generated when the theme is loaded/reloaded).
> So, therefore, the new images which are regenerated after the initial
> load are not taking effect.
> 
> I'm wondering if anyone has a clue about this.
> 
> GC
> -- 
> Gregory Casamento
> Open Logic Corporation, Principal Consultant
> yahoo/skype: greg_casamento, aol: gjcasa
> (240)274-9630 (Cell)
> http://www.gnustep.org
> http://heronsperch.blogspot.com
> 
> _______________________________________________
> Gnustep-dev mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/gnustep-dev




reply via email to

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