Bizarre Text Alignment MessageBox & MessageDialog

I am using Tahoe and Xojo2025 v6. Text displays awkwardly in the Message Dialog window. I am not sure which is responsible. The example below shows the text scrunched into the left side. Is there a cure or do you have to design your own window from scratch?

Welcome to Tahoe. This is the future of Apple.

2025r3, the latest version, uses Apple’s latest SDK so you get the new sizes, shapes, and alignments throughout your app. There is a UI compatibility mode switch, but allegedly UI compatibility is only going to be available in macOS 26 (next year it will not have an effect). Update: Anthony says this does not work!

I was under the impression that building with 2025r2.1 (the older macOS SDK) would cause the older UI sizes / dialogs. But I’m not sure.

My personal recommendation is to “upgrade to a more familiar experience” and switch back to Sequoia.

1 Like

Yeah, I was reading a thread on Reddit (because that was the best source I could find) about this very thing not too long ago. I think it’s a bad change, but what can you do (aside from building/using custom implementations or digging through macOSLib)?

Incidentally, setting UI Compatibility Mode to True does not alter the behavior. At least not on my ARM MBP with 26.1 installed.

1 Like

What about the theory of using the older Xojo? Does that work on your machine?

1 Like

Nope.

1 Like

If you like, we could use a timer to run a bit of code to change the alignment.

We did that long ago to center it :upside_down_face:

Multi-line centered text is objectively more difficult to read because the eye has to hunt to find the left-hand start of each line. The left-justified text in Tahoe may seem like a weird change, but it is actually a (very, very small) concession to traditional usability concerns, even if unintentional.

But even if left-justified text is a “feature”, the fact that the right side of the dialog box remains unused is bizarre. In the example, there is a line break between handle and unsaved, even though there is plenty of room for unsaved to be on the same line as handle.

The example is a MessageBox. There is no line break in the code.

MessageBox(“Unsaved Changes” + EndOfLine + EndOfLine + “Decide how to handle unsaved changes.”)

I reported such a problem with word breaks in dialogs on 31.07. in Feedback Assistant. It’s been just 5 months.

So I’m an old-school typesetter. I worked for years in the newspaper industry, fine-tuning text in every conceivable context. Looking at the screenshot you posted, I see several reasons why the text is shown like that:

  • Placing the word “unsaved” on the first line would leave “changes” on its own on the line below, an undesirable scenario we call an “orphan”. It creates two lines of text that are visually unbalanced, looking as though they might teeter over from the perceived weight of the first line. Typically, I would work to avoid orphans by manually breaking the preceding text here and there to fluff it up a little and give the orphan some company.
  • Apple’s type flowing algorithm may operate on visual principles, striving to produce the most compact block of type possible for aesthetic reasons. Since the headline of the alert is so short, the algorithm might “notice” that it could fit the entire text into a pretty consistent rectangle and make that decision.

These are just some hypotheses as to why this is happening. In any case, I’d suggest you either classify it as an odd artifact out of your control and move on, or add words to your alert to make it break differently. :slight_smile: Perhaps “Please decide how to handle unsaved changes in this document.”

3 Likes