“以低分辨率打开";从命令行 [英] "Open in Low Resolution" from command line

查看:115
本文介绍了“以低分辨率打开";从命令行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Mac OS通过设置应用程序信息中的以低分辨率打开"复选框,提供了以低非视网膜分辨率呈现应用程序的便捷功能.但是,为了进行开发,我使用来自IDE的运行配置来启动应用程序.

Mac OS provides the handy functionality of rendering an application in in low non-retina resolution by setting a checkbox "Open in Low Resolution" in the application info. However, for development, I start my application using a run configuration from my IDE.

如何使用可以放入运行配置的命令或从命令行以低分辨率启动应用程序?

How can I start the application in low resolution with a command I can put into the run configurations, or from the command line?

推荐答案

-AppleMagnifiedMode YES 添加到命令行或方案中的启动时传递的参数".

Add -AppleMagnifiedMode YES to your command line, or to "Arguments Passed On Launch" in your scheme.

这适用于大多数应用程序,这些应用程序将命令行参数放入 NSUserDefaults 注册域"中,否则将其忽略.

This works for most apps, which put command-line arguments into the NSUserDefaults "registration domain" and otherwise ignore them.

但是,某些应用程序,尤其是那些最初为Linux应用程序且使用跨平台工具包的应用程序,不会忽略其命令行参数.例如, Inkscape 使用 Gnome GIO工具包来解析命令行参数.由于它没有明确地向GIO告知 AppleMagnifiedMode 选项,因此GIO拒绝了它.对于此类应用程序,没有特别好的解决方法.

However, some apps, in particular those that were originally Linux apps and that use cross-platform toolkits, do not ignore their command-line arguments. For example, Inkscape uses the Gnome GIO toolkit to parse the command line arguments. Since it doesn't explicitly tell GIO about the AppleMagnifiedMode option, GIO rejects it. There is no particularly good workaround for such an app.

这篇关于“以低分辨率打开";从命令行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆