gnustep-dev
[Top][All Lists]
Advanced

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

Re: Theming non-main-app images


From: Richard Frith-Macdonald
Subject: Re: Theming non-main-app images
Date: Thu, 19 Nov 2015 06:21:02 +0000

> On 17 Nov 2015, at 17:47, Riccardo Mottola <address@hidden> wrote:
> 
> Hi,
> 
> I want to be able to theme the recycler bin icons of GWorkspace.
> 
> The icons themselves are in "many places" I find the Recycler icon in three 
> places:
> 
> Framework: /FSNode/Resources/Images/Recycler.tiff
> GWorkspace app: /GWorkspace/Resources/Icons/Recycler.tiff
> Recycler app: Recycler/Resources/Images/Recycler.tiff
> 
> The code however is done like this:
> 
> NSBundle *bundle = [NSBundle bundleForClass: [FSNodeRep class]];
> 
> imagepath = [bundle pathForResource: @"Recycler" ofType: @"tiff”];


> I think this code is done so that the Framework's Resource, indepdendently if 
> it is called from inside GWorkspace or Recycler.
> 
> Can I "theme" a Framework by specifying a bundle idnentifier?

Yes, it sounds like you can.
You use -pathForImageResource: rather than -pathForResource:ofType:
Each bundle will give you a different image (the one from the theme which 
corresponds to the bundle’s identifier).


reply via email to

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