Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] OS X retina support #6

Closed
wants to merge 63 commits into from
Closed

[WIP] OS X retina support #6

wants to merge 63 commits into from

Conversation

danomatika
Copy link
Contributor

This is a reference PR. Do not merge.

Some small additions to enable crisp rendering on high dpi displays in OSX. Basically use Tk 8.5 and a newer Wish Shell.app (included) and add a key to the Info.plist.

Some comparison screenshots.

Non retina:

testtone no retina

Retina:

testtone retina

TODO

  • The only hiccup so far is that the canvas font is now a bit too thin at the default size, IMO.

@danomatika danomatika changed the title retina support fixes: update to tcl 8.5, Wish Shell 8.5, & Info.plist flag OS X retina support Dec 9, 2015
@danomatika
Copy link
Contributor Author

Updating to TCL/TK 8.5 also fixes the duplicate Preferences entry for the audio, midi, etc settings which are available in the Audio menu anyway.

screen shot 2015-12-09 at 3 04 12 pm

However, now the Startup menu option is gone ...

@eighthave
Copy link
Contributor

eighthave commented Dec 10, 2015 via email

@danomatika
Copy link
Contributor Author

Yup. Trying to get some of it in vanilla in very small chunks.

@danomatika
Copy link
Contributor Author

@eighthave Also, do you have any notes on TK 8.5? I'm finding the menu accelerators and global bindings are causing events to happen twice now. That and the canvas loses focus after a menu event so an object created from the Put menu doesn't follow the mouse when you move back to the canvas.

@danomatika
Copy link
Contributor Author

@eighthave Also+, the font is too thin on retina. Is there a way to reenable antialiasing on the canvas? I know ::tk::mac::antialiasing is on but that only seems to affect general Tk widgets.

@eighthave
Copy link
Contributor

eighthave commented Dec 10, 2015 via email

@danomatika
Copy link
Contributor Author

@eighthave I've been working with the vanilla & extended tcl dirs side by side. Alot is the same thanks your work merging in the gui updates. I haven't looked into anything on the C side yet as I'm not sure how to compile Pd as port audio seems really outdated on the latest OSX.

@danomatika danomatika changed the title OS X retina support [WIP] OS X retina support Mar 27, 2016
@danomatika
Copy link
Contributor Author

danomatika commented Apr 27, 2016

Figured out the thin font is due to the default being Monaco. It just renders really thin at that size, probably since it's a higher resolution font file that comes with OSX. Changing the font to Courier yields a Pd that looks more "normal".

@danomatika
Copy link
Contributor Author

danomatika commented May 10, 2016

@eighthave So it seems like you fixed all of these by using a non-broken TK build. The build in TK 8.5 that comes with OS X is 8.5.9 which seems to have a number of problems (lots of noise in the python community due to problems with IDLE). Looking in to Pd-extended, you were bundling Tcl & TK as frameworks within the app bundle. I'm looking into doing that again, at least as an option.

@eighthave
Copy link
Contributor

eighthave commented May 10, 2016 via email

@danomatika
Copy link
Contributor Author

Ok cool. I started by digging into vanilla first, so I'm basically reverse engineering what y'all did with extended.

Building Tcl/TK is easy at least. Here's a screenshot of Pd running Tcl/Tk 8.5.19. It looks like the font rendering was improved for retina screens (looks great!):

screen shot 2016-05-10 at 3 30 04 pm

@danomatika
Copy link
Contributor Author

...and all the double bindings & a few other problems are now fixed. Great.

…dwindow menubar after its created; moved require apple events to init_for_platform so tk mac event handling is used when running pd from the commandline; added ShowHelp apple event
… wiht tcltk-wish & use included Wish.app by default
…r/less bindings conflict with comma/period bindings in Tk Cocoa so only set them on Win/Linux; some whitespace formatting fixes
… automatically; added menu_objectlist proc to show help-intro.pd instead as List objects... menu entry was being disabled due missing return value in command
…already does this, also add small sleep for Tk 8.4 to avoid pdsend socket error
danomatika and others added 24 commits May 26, 2016 10:17
…do not stay in window list, this matches behavior when windows are closed via pd core; disable highlight in aboutpd dialog
Apply string substitution to version number then update CFBundleVersion
with resulting value
Required for additional macOS application build scripts.
CFBundleVersion updating for macOS builds
@millerpuckette
Copy link
Contributor

accepted with extreme prejudice

@umlaeute
Copy link
Contributor

@danomatika given that this has been merged (despite the WIP), should/can we delete the osx-retina-support branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants