当我在Word 2016 for Windows中测试加载项时,功能区图像显示正常。但是,当我在Word Online中加载它时,现在显示图像。
我是否需要在清单中添加其他内容才能与Word Online兼容?桌面版似乎会自动调整功能区的大小,但在线版本是否需要特定的大小?
这是我的相关清单:
<VersionOverrides
xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<Description resid="residToolTip" />
<Hosts>
<Host xsi:type="Document">
<DesktopFormFactor>
<GetStarted>
<Title resid="ISBW.GetStarted.Title"/>
<Description resid="ISBW.GetStarted.Description"/>
<LearnMoreUrl resid="ISBW.GetStarted.LearnMoreUrl"/>
</GetStarted>
<FunctionFile resid="residDesktopFuncUrl" />
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<OfficeTab id="TabHome">
<Group id="ISBW.Group1Id1">
<Label resid="residLabel4" />
<Icon>
<bt:Image size="16" resid="icon1_16x16" />
<bt:Image size="32" resid="icon1_32x32" />
<bt:Image size="80" resid="icon1_80x80" />
<bt:Image size="20" resid="icon1_20x20" />
<bt:Image size="24" resid="icon1_24x24" />
<bt:Image size="40" resid="icon1_40x40" />
<bt:Image size="64" resid="icon1_64x64" />
</Icon>
<Control xsi:type="Button" id="Button3Id1">
<Label resid="residLabel3" />
<Supertip>
<Title resid="residLabel" />
<Description resid="residToolTip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon1_16x16" />
<bt:Image size="32" resid="icon3_32x32" />
<bt:Image size="80" resid="icon1_80x80" />
<bt:Image size="20" resid="icon1_20x20" />
<bt:Image size="24" resid="icon1_24x24" />
<bt:Image size="40" resid="icon1_40x40" />
<bt:Image size="64" resid="icon1_64x64" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="residUnitConverterUrl" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="icon1_16x16" DefaultValue="https://s3.amazonaws.com/isbw-word-addin/icon.png" />
<bt:Image id="icon1_32x32" DefaultValue="https://s3.amazonaws.com/isbw-word-addin/icon.png" />
<bt:Image id="icon1_80x80" DefaultValue="https://s3.amazonaws.com/isbw-word-addin/icon.png" />
<bt:Image id="icon2_32x32" DefaultValue="https://s3.amazonaws.com/isbw-word-addin/icon.png" />
<bt:Image id="icon3_32x32" DefaultValue="https://s3.amazonaws.com/isbw-word-addin/icon.png" />
<bt:Image id="icon1_20x20" DefaultValue="https://s3.amazonaws.com/isbw-word-addin/icon.png" />
<bt:Image id="icon1_24x24" DefaultValue="https://s3.amazonaws.com/isbw-word-addin/icon.png" />
<bt:Image id="icon1_40x40" DefaultValue="https://s3.amazonaws.com/isbw-word-addin/icon.png" />
<bt:Image id="icon1_64x64" DefaultValue="https://s3.amazonaws.com/isbw-word-addin/icon.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="residDesktopFuncUrl" DefaultValue="https://ishouldbewriting.net" />
<bt:Url id="residUnitConverterUrl" DefaultValue="https://s3.amazonaws.com/isbw-word-addin/home.html" />
<bt:Url id="ISBW.GetStarted.LearnMoreUrl" DefaultValue="https://ishouldbewriting.net/about" />
</bt:Urls>
<bt:ShortStrings>
<bt:String id="residLabel" DefaultValue="ishouldbewriting.net" />
<bt:String id="residLabel2" DefaultValue="ishouldbewriting.net" />
<bt:String id="residLabel3" DefaultValue="Set Writing Goal" />
<bt:String id="residLabel4" DefaultValue="ishouldbewriting.net" />
<bt:String id="residLabel5" DefaultValue="Another Command" />
<bt:String id="ISBW.GetStarted.Title" DefaultValue="Set your writing goal" />
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="residToolTip" DefaultValue="ishouldbewriting.net" />
<bt:String id="ISBW.GetStarted.Description" DefaultValue="Set your writing goal by clicking this button" />
</bt:LongStrings>
</Resources>
</VersionOverrides>
答案 0 :(得分:1)
您应该以适当的尺寸渲染图像。目前,您要声明多个图片尺寸,但为其上的654x720px图像提供相同的URI。
Office 2016桌面图标是位图图像。根据用户的DPI设置和触摸模式,将呈现不同的尺寸。包括所有八种支持的尺寸,以在所有支持的分辨率和上下文中创建最佳体验。以下是支持的尺寸 - 需要三个:
- 16 px(必填)
- 20 px
- 24 px
- 32 px(必填)
- 40 px
- 48 px
- 64 px(推荐,最适合Mac)
- 80 px(必填)