1.图标格式ICON
CEP插件图标支持PNG-8格式,PNG-24在低版本不支持。<Icons> 标签的子标签<Icon> 可以设置扩展的图标,图标有 2 种类型 Normal 和DarkNormal,分别在 PhotoShop 的界面主题颜色为亮色和暗色时显示。另外你可以在xxx.png 图标文件所在目录放入xxx@2X.png 文件,在高清屏下 PhotoShop 会调用xxx@2X.png 文件。一般普通图标的尺寸为 23 x 23 而 xxx@2X.png 为它的 2 倍 46 x 46。
2.manifest.xml文件
manifest.xml文件添加样式如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<ExtensionManifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ExtensionBundleId="com.adobe.illustrator.MideaMainAILib" ExtensionBundleVersion="1.0.0" Version="5.0">
<ExtensionList>
<Extension Id="com.adobe.illustrator.MideaMainAILib.panel" Version="1.0.0"/>
</ExtensionList>
<ExecutionEnvironment>
<HostList>
<Host Name="ILST" Version="[17.0,30.0]"/>
</HostList>
<LocaleList>
<Locale Code="All"/>
</LocaleList>
<RequiredRuntimeList>
<RequiredRuntime Name="CSXS" Version="7.0"/>
</RequiredRuntimeList>
</ExecutionEnvironment>
<DispatchInfoList>
<Extension Id="com.adobe.illustrator.MideaMainAILib.panel">
<DispatchInfo>
<Resources>
<MainPath>./html/index.html</MainPath>
<ScriptPath>./jsx/MediaExistedModules.jsx</ScriptPath>
<CEFCommandLine>
<Parameter>--high-dpi-support=1</Parameter>
<Parameter>--enable-nodejs</Parameter>
<Parameter>--allow-file-access</Parameter>
<Parameter>--allow-file-access-from-files</Parameter>
<Parameter>--mixed-context</Parameter>
</CEFCommandLine>
</Resources>
<Lifecycle>
<AutoVisible>true</AutoVisible>
<StartOn>
<Event>openByOther</Event>
</StartOn>
</Lifecycle>
<UI>
<Type>Panel</Type>
<Menu>章鱼助手2.0</Menu>
<Geometry>
<Size>
<Width>160</Width>
<Height>624</Height>
</Size>
<MinSize>
<Width>250</Width>
<Height>624</Height>
</MinSize>
<MaxSize>
<Width>250</Width>
<Height>1500</Height>
</MaxSize>
</Geometry>
<Icons>
<!-- 不同主题下的面板图标 -->
<Icon Type="Normal">./img/logo.png</Icon>
<Icon Type="RollOver">./img/logo.png</Icon>
<Icon Type="DarkNormal">./img/logo.png</Icon>
<Icon Type="DarkRollOver">./img/logo.png</Icon>
</Icons>
</UI>
</DispatchInfo>
</Extension>
</DispatchInfoList>
</ExtensionManifest>
3.CEFCommandLine命令
参数 | 笔记 |
---|---|
–enable-media-stream | 启用媒体(WebRTC 音频/视频)流式传输。 |
–enable-speech-input | 启用语音输入 (x-webkit-speech)。 |
–persist-session-cookies | 持久化会话 cookie。 |
–disable-image-loading | 禁止从网络加载图像。如果请求,仍将呈现缓存的图像。 |
–disable-javascript-open-windows | 禁止通过 JavaScript 打开窗口。 |
–disable-javascript-close-windows | 禁用通过 JavaScript 关闭窗口。 |
–disable-javascript-access-clipboard | 禁用通过 JavaScript 访问剪贴板。 |
–enable-caret-browsing | 启用插入符号浏览。 |
–proxy-auto-detect | 这会告诉 Chrome 尝试自动检测您的代理配置。在http://www.chromium.org/developers/design-documents/network-settings查看更多信息。 |
–user-agent | 用于使用自定义用户代理覆盖默认用户代理的字符串。 |
–disable-application-cache | 禁用应用程序缓存。 |
–enable-nodejs | 在扩展中启用 Node.js API。自 CEP 6.1 起受支持。 |
–disable-pinch | 禁用合成器加速的触摸屏捏合手势。 |
–mixed-context | 启用“混合上下文”模式。自 CEP 7.0 起受支持。 |
4.作者答疑
如有疑问,敬请留言。
本文含有隐藏内容,请 开通VIP 后查看