Retina support on macOS High Sierra

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
fishnet37222
Experienced Solver
Experienced Solver
Posts: 74
Joined: Sat May 06, 2017 1:40 pm

Retina support on macOS High Sierra

Post by fishnet37222 »

I'm using wxWidgets 3.1 on macOS High Sierra with Xcode 9 installed.

I have the key "NSPrincipalClass" set in my app's info.plist file, but the app still doesn't display as a Retina-compatible app should. Is there something I'm missing?
2017-09-20_09-30-10.png
2017-09-20_09-30-10.png (73.58 KiB) Viewed 2355 times
Dave F.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Retina support on macOS High Sierra

Post by ONEEYEMAN »

Hi,
Does "minimal" sample work for you?
Did you provide appropriate bitmaps for Retina in the resources?

Thank you.
fishnet37222
Experienced Solver
Experienced Solver
Posts: 74
Joined: Sat May 06, 2017 1:40 pm

Re: Retina support on macOS High Sierra

Post by fishnet37222 »

I built the "minimal" sample, and it looks correct.

I'm using XPMs for my bitmaps and I have both regular sized images and double-sized images with "@2x" at the end of the filename, before the extension. Do I need to also add "@2x" to the variable name inside the XPM file?
Dave F.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Retina support on macOS High Sierra

Post by ONEEYEMAN »

Hi,
I'm not sure, but I think XPM format requires that the variable name is the same as the file name.
Ca you try to change it and see?
Also, you can try and check if the XPM inside "minimal" sample directory is named the same?

Moreover, is XPM is really "@x2" or they just named this way?

Thank you.
fishnet37222
Experienced Solver
Experienced Solver
Posts: 74
Joined: Sat May 06, 2017 1:40 pm

Re: Retina support on macOS High Sierra

Post by fishnet37222 »

None of the samples include XPM files with @2x in their names and they all display correctly.
Dave F.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Retina support on macOS High Sierra

Post by ONEEYEMAN »

Hi,
Could you open the XPM from the samples in some external viewer and do the same with XPM from your project.
Are they look the same?

Thank you.
fishnet37222
Experienced Solver
Experienced Solver
Posts: 74
Joined: Sat May 06, 2017 1:40 pm

Re: Retina support on macOS High Sierra

Post by fishnet37222 »

My XPM files display fine using ImageMagick, which is what I used to create them. I honestly don't believe the issue has anything to do with the bitmaps I'm using.
Dave F.
User avatar
eranon
Can't get richer than this
Can't get richer than this
Posts: 867
Joined: Sun May 13, 2012 11:42 pm
Location: France
Contact:

Re: Retina support on macOS High Sierra

Post by eranon »

Hello,

You show a screenshot of your app, but should we see something special with it? Said otherwise: is there something wrong to see in this screenshot?

What if you rename your info.plist as Info.plist (case matters on case-sensitive filesystem like OS X and macOS allow; even if most will be on case-insensitive partition)?

How did you see it's not Retina-compatible? Or, said otherwise: what did you expect and what do you see?

-
EDIT: Also, what value did you give to the NSPrincipalClass key?

EDIT#2: Useful infos there: https://developer.apple.com/library/con ... ained.html
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
Post Reply