Forum Navigation
You need to log in to create posts and topics.

Re: NSAlert "improvements" in Big Sur+

Posted by: fblistserve <fblistserve@...>



On Apr 15, 2022, at 1:37 PM, Brian <fblistserve@cox.net> wrote:


If you haven't noticed yet, Big Sur's ( and not fixed in Monterey ) NSAlert dialogs are now vertically oriented, so if you're displaying text with a width to prevent wrapping ( and with no centering ), it looks terrible. Not to mention the stacked buttons ( instead of side-by-side ) and other "improvements".


tries to portray it as a new feature but it's clearly a downgrade ( see discussion here: https://mjtsai.com/blog/2020/07/03/big-surs-narrow-alerts/ )

As Leo Revzin points out ( see discussion at Michael Tsai's blog above ), there is an alternative custom class. Yes, it's possible to just write your own panel and use it but this ( apparently - haven't used it yet ) a drop in replacement for NSAlert.  See: https://github.com/TroikaTronix/NSCustomAlert

btw: just making the alert window wider by adding an accessory view( alert.accessoryView = [[[NSView alloc] initWithFrame:NSMakeRect(0, 0, 800, 0)] autorelease]; doesn't help. The window is wider but the text is still constrained to a narrow valley in the dialog's center.

Hope this saves someone time.


Warning: the Objective-C code at the link might be more complex than some want to tackle. I would recommend just building your own panel of the appropriate size. The point of the previous post is just to alert everyone to the new NSAlert behavior ( downgrade IMO ). 


--
To unsubscribe, send ANY message to: futurebasic-unsubscribe@freegroups.net To access the list archives, go to: http://freegroups.net/groups/futurebasic/