Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Arrow of NSMenu

9 views
Skip to first unread message

Riccardo Mottola

unread,
Mar 28, 2013, 11:30:20 AM3/28/13
to discuss...@gnu.org
Hi,

I want to theme the Menu arrow of submenus.

I find in the NSMenuItemCell this code:

NSImage *arrow = [NSImage imageNamed: @"NSMenuArrow"];

thus I suppose id displays a NSMenuArrow, bout I couldn't find any in
the "Images" folder of GUI!

ls /System/Library/Images | grep Arrow
common_3DArrowDown.tiff
common_3DArrowLeft.tiff
common_3DArrowRightH.tiff
common_3DArrowRight.tiff
common_3DArrowUp.tiff
common_ArrowDownH.tiff
common_ArrowDown.tiff
common_ArrowLeftH.tiff
common_ArrowLeft.tiff
common_ArrowRightH.tiff
common_ArrowRight.tiff
common_ArrowUpH.tiff
common_ArrowUp.tiff
common_DownArrowSmall.tiff
common_UpAndDownArrowSmall.tiff
NSComboArrow.tiff


Does it get remapped somehow? where? to which one?

Or is just another image used? Still, that code confuses me.

Riccardo

Eric Wasylishen

unread,
Mar 28, 2013, 11:40:16 AM3/28/13
to Riccardo Mottola, Discuss-gnustep Discuss

Hey Riccardo, check the nsmappings.strings file in Images. I think that maps nsmenuarrow to one of the common_ images.

Eric

_______________________________________________
Discuss-gnustep mailing list
Discuss...@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Riccardo Mottola

unread,
Mar 28, 2013, 1:11:39 PM3/28/13
to Eric Wasylishen, Discuss-gnustep Discuss
On 03/28/2013 04:40 PM, Eric Wasylishen wrote:
>
> Hey Riccardo, check the nsmappings.strings file in Images. I think
> that maps nsmenuarrow to one of the common_ images.
>

NSMenuArrow = common_3DArrowRight;

However, I'm unable to theme it using Thematic.

I both tried using the special "menus inspector" and by just using the
system image inspector.

Copying the image manually in the ThemeImages has unbrepdctable results,
with the image sometimes not display at all or sometimes display "old".
Very strange.

Riccardo

Germán A. Arias

unread,
Mar 28, 2013, 2:45:01 PM3/28/13
to Riccardo Mottola, Discuss-gnustep Discuss
This problem could be related with a problem with AppIcon that I solved
some time ago.

The theme is loaded at -finishLaunching in NSApplication (when is called
-standardUserDefaults). If the menu items are build before this, the
theme will not take effect. I solved this problem loading the
corresponding images in +initialize at GSGormLoader.m.



Germán A. Arias

unread,
Mar 30, 2013, 2:29:04 AM3/30/13
to Riccardo Mottola, Discuss-gnustep Discuss
El jue, 28-03-2013 a las 12:45 -0600, Germán A. Arias escribió:
>
> This problem could be related with a problem with AppIcon that I solved
> some time ago.
>
> The theme is loaded at -finishLaunching in NSApplication (when is called
> -standardUserDefaults). If the menu items are build before this, the
> theme will not take effect. I solved this problem loading the
> corresponding images in +initialize at GSGormLoader.m.
>

Sorry, my memory is failing. The bug that may be related is # 28580.



Riccardo Mottola

unread,
Apr 3, 2013, 8:37:32 AM4/3/13
to ger...@xelalug.org, Discuss-gnustep Discuss
Hi,
I don't understand GSGormLoader either in this case. Fred, Richard, what
do you think? All images should be themable and also "switch"
synamically, German possibly points out to a problem here.


Riccardo


Riccardo Mottola

unread,
Apr 5, 2013, 5:25:39 AM4/5/13
to Eric Wasylishen, Discuss-gnustep Discuss
Hi all,

On 03/28/13 16:40, Eric Wasylishen wrote:
>
> Hey Riccardo, check the nsmappings.strings file in Images. I think
> that maps nsmenuarrow to one of the common_ images.
>
back to the original problem, which is different from what German supposed.

Let's remember that we have a mapping

NSMenuArrow = common_3DArrowRight;


Leaving out Thematic for a moment, I found that placing inside the Theme
Images a an image named

common_3DArrowRight.tif

doesn't work, while putting one called

NSMenuArrow.tif

works fine and the image gets loaded even dynamically when changing the
theme.


Riccardo

0 new messages