Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Make OpenSCAD look better on retina displays. #317

Merged
merged 1 commit into from

2 participants

@nico

Apps need an NSPrincipalClass entry in Info.plist to look good on retina
displays, see "Framework-Scaled Mode Provides Automatic Scaling" in
http://developer.apple.com/library/mac/#documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html

It's also what we did in Chromium ( https://codereview.chromium.org/10069029 )
and what was suggested in openscad issue #279.

This only makes the window decoration and all text pretty. The 3d view
is still pixel-doubled: OpenGL is a pixel-based API and needs an
explicit opt-in. This can be addressed in a future patch.

While here, also consistently use tabs instead of spaces.

@nico nico Make OpenSCAD look better on retina displays.
Apps need an NSPrincipalClass entry in Info.plist to look good on retina
displays, see "Framework-Scaled Mode Provides Automatic Scaling" in
http://developer.apple.com/library/mac/#documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html

It's also what we did in Chromium ( https://codereview.chromium.org/10069029 )
and what was suggested in openscad issue #279.

This only makes the window decoration and all text pretty. The 3d view
is still pixel-doubled: OpenGL is a pixel-based API and needs an
explicit opt-in. This can be addressed in a future patch.

While here, also consistently use tabs instead of spaces.
894c9fe
@kintel
Owner

Thanks. Do you know what needs to be done to get the OpenGL window in full resolution?
Is this something which must be handled by Qt, i.e. it won't happen until we upgrade to Qt5?

@kintel kintel merged commit a770947 into openscad:master
@nico nico deleted the nico:retina branch
@nico

Thanks. Do you know what needs to be done to get the OpenGL window in full resolution?

It depends on how the GL context is initialized. For NSOpenGLView-based apps, one must call setWantsBestResolutionOpenGLSurface:YES on the view.

Is this something which must be handled by Qt, i.e. it won't happen until we upgrade to Qt5?

I read up a bit on this, and it looks like Qt 4.8.4 doesn't have support for this, see e.g. qgc_mac.mm in the Qt tree. It's possible to hack around this (#318), but that adds knowledge of Qt internals to OpenSCAD, so maybe you think that's a nonstarter. If you're not concerned by that, it's probably possible to make it work. (It works for the main window for me over here: Before http://i.imgur.com/yDnISi7.png , after http://i.imgur.com/PvKs6of.png )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 23, 2013
  1. @nico

    Make OpenSCAD look better on retina displays.

    nico authored
    Apps need an NSPrincipalClass entry in Info.plist to look good on retina
    displays, see "Framework-Scaled Mode Provides Automatic Scaling" in
    http://developer.apple.com/library/mac/#documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html
    
    It's also what we did in Chromium ( https://codereview.chromium.org/10069029 )
    and what was suggested in openscad issue #279.
    
    This only makes the window decoration and all text pretty. The 3d view
    is still pixel-doubled: OpenGL is a pixel-based API and needs an
    explicit opt-in. This can be addressed in a future patch.
    
    While here, also consistently use tabs instead of spaces.
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 4 deletions.
  1. +6 −4 Info.plist
View
10 Info.plist
@@ -35,15 +35,17 @@
<string>Editor</string>
<key>CFBundleTypeIconFile</key>
<string>SCAD.icns</string>
- <key>LSIsAppleDefaultForType</key>
+ <key>LSIsAppleDefaultForType</key>
<true/>
</dict>
</array>
<key>NSAppleScriptEnabled</key>
- <true/>
+ <true/>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
<key>OSAScriptingDefinition</key>
<string>OpenSCAD.sdef</string>
- <key>SUPublicDSAKeyFile</key>
- <string>dsa_pub.pem</string>
+ <key>SUPublicDSAKeyFile</key>
+ <string>dsa_pub.pem</string>
</dict>
</plist>
Something went wrong with that request. Please try again.