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
Earned a small fee
Earned a small fee
Posts: 17
Joined: Tue Mar 24, 2020 2:28 am

Blurry text on Mac

Post by asztandi »

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: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Blurry text on Mac

Post by ONEEYEMAN »

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

Thank you.
asztandi
Earned a small fee
Earned a small fee
Posts: 17
Joined: Tue Mar 24, 2020 2:28 am

Re: Blurry text on Mac

Post by asztandi »

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
Earned a small fee
Earned a small fee
Posts: 17
Joined: Tue Mar 24, 2020 2:28 am

Re: Blurry text on Mac

Post by asztandi »

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: 48
Joined: Sun Oct 18, 2015 9:31 am

Re: Blurry text on Mac

Post by thoray »

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
Earned a small fee
Earned a small fee
Posts: 17
Joined: Tue Mar 24, 2020 2:28 am

Re: Blurry text on Mac

Post by asztandi »

Worked like magic! Thank you so much!
Post Reply