本文档将描述如何自定义BOINC Manger普通视图的外观。
关键词: BOINC, BOINC Manger, skin, BOINC皮肤, BOINC管理器皮肤, 教程, BOINC皮肤教程
皮肤
皮肤可以使你自定义BOINC Manager的外观。
任何自定义皮肤都需要一个skin.xml文件。本文档将介绍skin.xml文件的结构。
skin.xml应当包含在在'skins'文件夹下自己的目录内。
实例:
+ /BOINC
|
+---+ /Skins
|
+---+ /Skin Name
|
+---+ skin.xml
|
+---+ <skin resources>
本地化
BOINC Manager 会尝试找出并使用本地化的皮肤选项。它将自动选择合适的语言,如果无法找到合适的语言,则回到英文。在‘Advanced GUI’的选项对话框内可以设置忽略语言搜索功能。
如果当前的本地设置为'pt_BR',而所选择的皮肤里无法找到这个本地设置,那么下一个要搜索的语言就是'pt'。如果'pt’也无法找到,那么管理器就会选择'en'。
Skin choice
| Example
|
Locale
| pt_BR
|
Language
| pt
|
English
| en
|
BOINC built-in skin
| BOINC built-in skin
|
结构
skin.xml文件结构如下:
<skin>
<pt_BR>
<simple />
[ <advanced /> ]
[ <wizards /> ]
</pt_BR>
<pt>
<simple />
[ <advanced /> ]
[ <wizards /> ]
</pt>
<en>
<simple />
[ <advanced /> ]
[ <wizards /> ]
</en>
</skin>
以上的advanced和wizard部分都是可选的。
示例
World Community Grid skin
Skin examples
皮肤设计语句
普通
普通设计语句包含组成Simple GUI的所有元素。
普通设计语句内有:
名字
Name
| 类型
Type
| 图像宽
Image Width
| 图像高
Image Height
| 备注
Notes
|
background_image
| Image
| 410px
| 540px
| 用作Simple GUI背景图像。此元素需要确定一个背景颜色。Used as the Simple GUI background image. A background color should be specified for this element.
|
spacer_image
| Image
| 2px
| 11px
| 用于分隔Simple GUI底部的链接。Used to separate the links on the bottom of the Simple GUI
|
static_line_color
| String
|
|
| 此颜色以':'为标志,用RGB值表示。The color is represented as an RGB value with the token being ':'
|
state_indicator_background_image
| Image
| 264px
| 35px
|
|
connecting_indicator_image
| Image
| 14px
| 15px
|
|
error_indicator_image
| Image
| 69px
| 20px
|
|
workunit_active_tab
| Simple Tab
| 16px
| 16px
|
|
workunit_suspended_tab
| Simple Tab
| 16px
| 16px
|
|
workunit_tab_area_background_image
| Image
| 343px
| 24px
|
|
workunit_area_background_image
| Image
| 343px
| 314px
|
|
workunit_animation_background_image
| Image
| 294px
| 146px
|
|
workunit_animation_image
| Image
| 290px
| 126px
|
|
workunit_gauge_background_image
| Image
| 258px
| 18px
|
|
workunit_gauge_progress_indicator_image
| Image
| 8px
| 7px
|
|
project_area_background_image
| Image
| 343px
| 113px
|
|
project_image
| Image
| 40px
| 40px
| 未设定图片的项目的默认显示图片。Default image to display for a project that does not currently have an image defined.
|
attach_project_button
| Simple Button
| 81px
| 18px
|
|
right_arrow_button
| Simple Button
| 20px
| 20px
|
|
left_arrow_button
| Simple Button
| 20px
| 20px
|
|
save_button
| Simple Button
| 57px
| 16px
|
|
synchronize_button
| Simple Button
| 81px
| 18px
|
|
cancel_button
| Simple Button
| 57px
| 16px
|
|
close_button
| Simple Button
| 57px
| 16px
|
|
help_button
| Simple Button
| 18px
| 18px
|
|
copy_all_button
| Simple Button
| 85px
| 18px
|
|
copy_button
| Simple Button
| 85px
| 18px
|
|
messages_link_image
| Simple Link
| 70px
| 20px
|
|
messages_alert_link_image
| Simple Link
| 70px
| 20px
|
|
suspend_link_image
| Simple Link
| 59px
| 20px
|
|
resume_link_image
| Simple Link
| 59px
| 20px
|
|
preferences_link_image
| Simple Link
| 81px
| 20px
|
|
advanced_link_image
| Simple Link
| 101px
| 20px
|
|
dialog_background_image
| Image
| 800px
| 600px
| 对话框的高和宽随着计算机的设置而变化,所以图像的中心就是在对话框中所指定的位置。The dialogs height and width change according to the configuration of the computer so the center of the image is what is drawn on to the dialog.
|
普通设计语句结构如下:
<simple>
<background_image />
<spacer_image />
...
</simple>
高级
高级设计语句包含组成Advanced GUI的所有元素。
高级设计语句内有:
Name
| Type
| Image Width
| Image Height
| Notes
|
application_name
| String
|
|
| 显示于标题栏的应用程序名Displayed in title bar.
|
application_short_name
| String
|
|
| 应用程序名的简写Shorter version of the application name
|
application_icon
| Icon
| 16px
| 16px
| 任务栏图标Taskbar icon.
|
application_disconnected_icon
| Icon
| 16px
| 16px
| 无法连接时的任务栏图标Taskbar icon when disconnected.
|
application_snooze_icon
| Icon
| 16px
| 16px
| 休息时的任务栏图标Taskbar icon when snoozing.
|
application_logo
| String
| 50px
| 50px
| 显示在“关于”中的应用程序图标Application logo that appears in the about box.
|
organization_name
| String
|
|
| 发布客户端软件包的组织名称Organization associated with the release of the client software package.
|
organization_website
| String
|
|
| 组织的网站Organization website.
|
organization_help_url
| String
|
|
| 组织的帮助链接Organization's help url.
Parameters:
target = which view launched the help request.
version = the version of boinc that launched the help request.
controlid = which control within the view was the user trying to get help with.
See Manager Help System? for further details.
|
open_tab
| Number
|
|
| 高级GUI默认显示。“0”表示打开上次使用的。Which tab to open by default in the Advanced GUI. A value of '0' means open the last tab used.
|
exit_message
| String
|
|
| 关闭BOINC管理器时显示给用户的信息。What message should be sent to the user when they close BOINC manager.
|
高级设计语句结构如下:
<advanced>
<application_name />
<application_icon />
...
</advanced>
向导
向导设计语句包含两个元素,分为项目向导附加元素和帐号向导附加元素。
项目向导附加元素结构如下:
<attach_to_project>
<title>Attach to Project</title>
<logo>graphic/logo.png</logo>
</attach_to_project>
其中标题会在向导的标题栏中显示。
图标将在向导的每个页面里显示,图标文件应高280px,宽115px。格式可以为以下任何一种:PNG,JPG,GIF,和BMP。图标文件的放置位置应参照skin.xml描述文件,其中地址分隔符在所有平台下都为'/'。
帐号向导附加元素结构如下:
<attach_to_account_manager>
<title>Attach to Account Manager</title>
<logo>graphic/logo.png</logo>
<account_info_message></account_info_message>
</attach_to_account_manager>
其中标题会在向导的标题栏中显示。
图标将在向导的每个页面里显示,图标文件应高280px,宽115px。格式可以为以下任何一种:PNG,JPG,GIF,和BMP。图标文件的放置位置应参照skin.xml描述文件,其中地址分隔符在所有平台下都为'/'。
account_info_message是当询问用户用户名/电邮地址以及密码信息时,管理器显示的文字。
向导设计语句示例如下:
<wizards>
<attach_to_project />
<attach_to_account_manager />
...
</wizards>