Re: Yosemite-like Toolbar: Segmented Controls, Buttons, Template Images?
Re: Yosemite-like Toolbar: Segmented Controls, Buttons, Template Images?
- Subject: Re: Yosemite-like Toolbar: Segmented Controls, Buttons, Template Images?
- From: Jerry Krinock <email@hidden>
- Date: Thu, 18 Dec 2014 09:41:34 -0800
> On 2014 Dec 18, at 08:14, Ken Thomases <email@hidden> wrote:
>
> You dropped an "s" … but, as I said, it's better to just set the button type to one which has the relevant showsStateBy behavior
Got it. Thank you.
All is resolved now. I’ve concluded that the “blue lines when selected” behavior must be a custom control used only in Xcode, onto which I’d gotten sidetracked. Personally, I feel it is rather difficult for a user even with good vision realize which one is selected. The correct answer, as Ken said, is:
For Segmented Controls:
Style: Textured Square (*)
Mode: Select One
For Buttons:
Style: Round Textured
This looks and behaves like Finder’s toolbar. It gives the selected segment a gray (dark gray if user has set “Increase Contrast”) background, and it *does* reverse the luminance as desired if I -setTemplate:YES on my custom monochrome images.
(*) I also considered “Automatic”. Automatic has the same height, corner radii, and selection behavior as Textured Square. Often, “automatic” implies “future-proof”. But NSButton (NSBezelStyle) does not have “Automatic”, and I’m afraid that Apple might change the “Automatic” in 10.11, and then my buttons would different than my segmented controls.
I would finally remark that the option names “Textured Square” and “Round Textured” shown in Interface Builder are 100% misleading. Neither one of them have any texture that I can see, the “Square” one is not square, the “Round” one is not round; they are both what I would call “Square with rounded corners” or “Rounded Square” or “Rounded Rect”, but that name is used by a different option. And the word order is flipped, like one is in English and the other in Spanish. This comedy is, I presume, the result of AppKit’s winding evolution over the last 30 years :))
_______________________________________________
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