Re: NSButton in NSToolbarItem does not use "small size"
Re: NSButton in NSToolbarItem does not use "small size"
- Subject: Re: NSButton in NSToolbarItem does not use "small size"
- From: Keary Suska <email@hidden>
- Date: Sun, 24 Feb 2013 18:15:23 -0700
On Feb 24, 2013, at 4:05 PM, Kyle Sluder wrote:
> Perhaps I'm not understanding your post, but
>
> On Sun, Feb 24, 2013, at 02:53 PM, Keary Suska wrote:
>> On Feb 24, 2013, at 1:11 PM, Michael Starke wrote:
>> I suspect the issue is that NSButton does not have built-in semantics for
>> control size.
>
> NSButton does indeed have built-in semantics for controlSize.
>> In fact, none of the cells in question are documented to
>> respond to -setControlSize is the way you are seeing, but apparently some
>> do.
>
> All NSCell instances respond to -setControlSize:.
That's not what I am saying. I was understanding that the OP is saying that his popups, for example, are resizing like they would in IB, which means they are also changing their font, which you point out below is documented *not* to happen, but, apparently, is. At least for some controls. Explanation?
>> If you consider that a button of any control size can actually be of
>> any size, how would the cell know how to resize itself, other than to
>> just change its font? And if it has an image, how would that work?
>
> As per the documentation, setting the controlSize of a cell does not
> change its font. After the cell gets -setControlSize:, someone is
> responsible for calling -sizeToFit: on the view containing that cell.
What I was trying to say here is that I can't see how the framework can predict on its own exactly what to do with a button, other than changing its font. To whit, I have a number of buttons with icons and no text, and even IB won't do anything with them when their control size is changed and even size to fit is called. As well when the control size is reduced the images are never clipped, so, what is setControlSize actually doing in these cases? Hence my wondering whether NSButton even has the support.
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden