Blurry text on Mac

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
asztandi
In need of some credit
In need of some credit
Posts: 6
Joined: Tue Mar 24, 2020 2:28 am

Blurry text on Mac

Post by asztandi » Tue Mar 24, 2020 2:41 am

Hello!

My team and I are working on a stand alone desktop application for which we use wxwidgets. On Windows and on Linux the texts in all controls look good, they are clear and sharp as expected. On Mac, specifically Catalina but I think it happened even with Mojave, the texts in all the controls except the menu items look blurry. We are using wxWidgets 3.1.3 version and the computers that I am seeing this issue on have retina displays.
Any advice would be greatly appreciated. If you could point me in a direction where I might find the solution.
Thank you!

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4361
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Blurry text on Mac

Post by ONEEYEMAN » Tue Mar 24, 2020 4:04 pm

Hi,
Are you able to reproduce it in the {minimal, widgets} sample?

Thank you.

asztandi
In need of some credit
In need of some credit
Posts: 6
Joined: Tue Mar 24, 2020 2:28 am

Re: Blurry text on Mac

Post by asztandi » Thu Apr 02, 2020 3:16 pm

Hello,
Thank you for you quick reply.
We have some minimal demo apps that use wxWidgets and I could not reproduce it there. That's good to know, it means the setting/error is somewhere in our code base.
Thank you for you help.

asztandi
In need of some credit
In need of some credit
Posts: 6
Joined: Tue Mar 24, 2020 2:28 am

Re: Blurry text on Mac

Post by asztandi » Tue Apr 28, 2020 2:35 pm

It would be very helpful to know at least what might be the cause of these blurry controls under macOS: is it the way wxWidgets configured, or is it specific to certain controls, or does it matter that the size of the control is specified for Mac instead of letting the sizer lay it out? Actually, I do that quite often and I'm not sure whether that is a good practice. The menu items look good but all the other controls are blurry.

thoray
Knows some wx things
Knows some wx things
Posts: 42
Joined: Sun Oct 18, 2015 9:31 am

Re: Blurry text on Mac

Post by thoray » Tue Apr 28, 2020 5:57 pm

Try adding:

<key>NSPrincipalClass</key>
<string>NSApplication</string>

into Info.plist. That's supposed to enable retina support. wxWidgets samples do it too, see Info.plist.in.

asztandi
In need of some credit
In need of some credit
Posts: 6
Joined: Tue Mar 24, 2020 2:28 am

Re: Blurry text on Mac

Post by asztandi » Wed Apr 29, 2020 7:27 pm

Worked like magic! Thank you so much!

Post Reply