ezieragabriel / arduino

Automatically exported from code.google.com/p/arduino
Other
0 stars 0 forks source link

[OS X] Retina display support (NSHighResolutionCapable and image@2x) #1140

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Crossposting here and at the Github repo; it's not clear which one is more 
active.

There are two issues regarding Retina support: Text/buttons/UI in general, and 
high-quality images.

The "simple" text/buttons/etc issue can be addressed by adding the following to 
Info.plist:
    <key>NSHighResolutionCapable</key>
    <true/>
This was apparently done with this commit:
https://github.com/arduino/Arduino/commit/409da1d9c790e03aac9b078ac791bfb0502edf
41
in August 2012, but the version of 1.5.7 that I downloaded in August 2014 did 
not have this key in its Info.plist.

The images issue is a bit more complicated. I'm used to working with iOS, in 
which the OS will generally accept either `image.png` or `image@2x.png` (the 
high-resolution version). This is apparently not the case with OS X; when I try 
to use an image I created for the little down-triangle in the top right of the 
IDE, it doesn't show up at all if the filename includes the "@2x" and shows up 
twice as large as should be if the filename doesn't include the "@2x".
The fix here is more involved, but shouldn't be too difficult (I think). First, 
high-def images need to be created for the eleven images in 
Arduino.app/Contents/Java/lib/theme. Then, the source code needs to be modified 
to look for the "@2x" images as well as the regular ones, and take the correct 
one. I don't know exactly how this is done, and I suspect it will be more 
involved in Java than Obj-C. Sorry.

SEE ALSO:
Google Code issue 982: https://code.google.com/p/arduino/issues/detail?id=982
Github issue 982: https://github.com/arduino/Arduino/issues/982
Github issue 2204: https://github.com/arduino/Arduino/issues/2204
Github issue 2309: https://github.com/arduino/Arduino/issues/2309

Original issue reported on code.google.com by jacobsep...@gmail.com on 17 Sep 2014 at 8:29

Attachments:

GoogleCodeExporter commented 9 years ago
This google code is no longer used - I'm surprised you can even open issues 
still. I'll poke Cristian about that. Let's continue discussion on github.

Original comment by matthijskooijman@gmail.com on 17 Sep 2014 at 8:57