Re: image larger than 32*32 in toolbar
Re: image larger than 32*32 in toolbar
- Subject: Re: image larger than 32*32 in toolbar
- From: j o a r <email@hidden>
- Date: Thu, 24 Mar 2005 07:27:31 +0100
On 2005-03-24, at 01.10, M. Uli Kusterer wrote:
At 18:33 Uhr -0500 23.03.2005, Olivier Destrebecq wrote:
I tried overriding setmaxSize: from NSToolbarItem, but _maxSize is
declared private and thus won't let me do it:-( any idea or more
precise pointers?
Why do you want to do that anyway? Toolbars are fixed-height. They're
for little shortcut buttons and things like that. If you want to put
bigger images in a toolbar, it sounds to me like you're mis-using it
for something it wasn't meant for.
Toolbars does not have a fixed height!
Still, I agree with Uli that I don't think that you should try to do
this. NSToolbar is not subclass friendly, and not designed to do what
you're trying to do. I like to say "don't fight the frameworks", do
things the way the framework designer intended - or else you will end
up in a world of pain...
If you want to have the ability to increase the size of UI components
to make them easier to use for older users, file enhancement requests
with Apple via their web based bug reporter. It sounds like something
that should be provided on a system level. Perhaps via some sort of way
to control the resolution of UI components independently of the monitor
resolution...
That said, I'll be more reasonable and offer two constructive
alternatives:
1) Write your own toolbar. I made an API compatible NSToolbar
implementation once, and it's not that difficult. If you don't have to
be API compatible with NSToolbar it's going to be even easier.
2) Alternatively you can use a regular NSToolbar and the "custom view"
functionality to provide an NSImageView with a minSize that is for
example 64x64, or 128x128. That would still not allow you to change the
size of the text of your toolbar items, however.
You might use a custom view with both a large image, and a large text
label, but it would probably be difficult to "hide" the regular toolbar
item labels, and it might be weird with both a small default label, and
a large custom label. But you might make it work somehow. For example,
you might lock the toolbar into icon-only display mode.
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden