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: Ivan Vučica
Subject: Re: Theming non-main-app images
Date: Wed, 18 Nov 2015 17:28:43 +0000

This is a good candidate for actually fixing the apps, right?

Why not NSImageNameTrashEmpty / NSImageNameTrashFull?
  http://api.monobjc.net/html/F_Monobjc_AppKit_NSImage_NSImageNameTrashEmpty.htm
  http://api.monobjc.net/html/F_Monobjc_AppKit_NSImage_NSImageNameTrashFull.htm
Or see the "toolbar named images" section here:
  http://web.archive.org/web/20151118172738/https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSImage_Class/#//apple_ref/doc/constant_group/Toolbar_Named_Images

These are 'available in OS X 10.6 and later'.


On Tue, Nov 17, 2015 at 5:47 PM, 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"];
trashIcon = [[NSImage alloc] initWithContentsOfFile: imagepath];

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?

Nevertheless, having duplication, I tried to "theme" this quick way:
trashIcon = [[NSImage imageNamed:@"Recycler.tiff"] retain];

and then providing an Image for GWorkspace in my theme (I would probably duplicate it wor Recycler then). However I get no Icon at all.

What am I doing wrong? Another way to make this themable?

Riccardo

_______________________________________________
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]