Skinning.commandImages: Difference between revisions
(added recovered subpage. Verification needed) |
(Code formatting correction) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
JUST RECOVERED, WHERE | JUST RECOVERED, WHERE IS THAT BOX? | ||
{Language}} | {{Language}} | ||
{{RecoveredPage|The following content has been recovered from the old wiki and pantheraproject*net. Date unknown, but seems links properly. Competent verification needed}} | {{RecoveredPage|The following content has been recovered from the old wiki and pantheraproject*net. Date unknown, but seems links properly. Competent verification needed. OCE.}} | ||
<h2> <span class="mw-headline">commandImages</span></h2> | |||
<p>The <b>commandImages</b> provides new icons for different Shareaza commands, replacing the original (default) icons. | <p>The <b>commandImages</b> provides new icons for different Shareaza commands, replacing the original (default) icons. | ||
</p><p>Any number of new command icons can be specified, but each must be 16x16 in size. You can load images from .ico files (one image per file), or .bmp image files (many images per file, arranged in a row). Icon files have automatic transparency, while bitmap files need to have a specific transparency colour. By default this is light green (00FF00), but you can specify a different colour. | </p><p>Any number of new command icons can be specified, but each must be 16x16 in size. You can load images from .ico files (one image per file), or .bmp image files (many images per file, arranged in a row). Icon files have automatic transparency, while bitmap files need to have a specific transparency colour. By default this is light green (00FF00), but you can specify a different colour. | ||
Line 10: | Line 10: | ||
</p><p>Here is an example from <b>MyIconsSkin.xml</b>: | </p><p>Here is an example from <b>MyIconsSkin.xml</b>: | ||
</p> | </p> | ||
<div dir="ltr" style="text-align: left;"><div class="source-xml" style="font-family: monospace;"><pre | <div dir="ltr" style="text-align: left;"><div class="source-xml" style="font-family: monospace;"><pre> <?xml version="1.0" encoding="UTF-8"?> | ||
<skin xmlns="http://www.shareaza.com/schemas/Skin.xsd" version="1.0"> | |||
<manifest name="My Icons Skin" author="Me" type="Skin"/> | |||
<commandImages> | |||
<bitmap path="MyIcons.bmp" mask="00FF00"> | |||
<image id="ID_TAB_HOME"/> | |||
<image id="ID_TAB_LIBRARY"/> | |||
<image id="ID_TAB_NETWORK"/> | |||
<image id="ID_TAB_TRANSFERS"/> | |||
<image id="ID_TAB_CONNECT"/> | |||
</bitmap> | |||
<icon path="MyIcon.ico" id="ID_NETWORK_CONNECT"/> | |||
</commandImages> | |||
</skin></pre></div></div> | |||
<p>In the case of an icon, the target command where the icon is to be used is specified in the <b>id</b> attribute. For a list of command IDs, check out <b>default-en.xml</b> in your skins folder or consult the visual index of icons in <a href="http://shareaza.sourceforge.net/?id=skindocs/xml-default" class="external text" title="http://shareaza.sourceforge.net/?id=skindocs/xml-default">Default.xml</a> and <a href="http://shareaza.sourceforge.net/?id=skindocs/xml-definitions" class="external text" title="http://shareaza.sourceforge.net/?id=skindocs/xml-definitions">Definitions.xml</a> online. | <p>In the case of an icon, the target command where the icon is to be used is specified in the <b>id</b> attribute. For a list of command IDs, check out <b>default-en.xml</b> in your skins folder or consult the visual index of icons in <a href="http://shareaza.sourceforge.net/?id=skindocs/xml-default" class="external text" title="http://shareaza.sourceforge.net/?id=skindocs/xml-default">Default.xml</a> and <a href="http://shareaza.sourceforge.net/?id=skindocs/xml-definitions" class="external text" title="http://shareaza.sourceforge.net/?id=skindocs/xml-definitions">Definitions.xml</a> online. | ||
</p><p>In the case of a bitmap, many icons are stored in the same image. Each icon must be associated with one or more commands. This is done with the <b><image></b> tag, which also has an <b>id</b> attribute. | </p><p>In the case of a bitmap, many icons are stored in the same image. Each icon must be associated with one or more commands. This is done with the <b><image></b> tag, which also has an <b>id</b> attribute. | ||
</p><p>Advanced users may note that there is a second parameter named <b>index</b> which can be applied to the <b><image></b> tag, which specifies the index of the icon in the image file (0-based). Specific use of this attribute can be used to associate the same image index with several commands, thus avoiding duplication. For example: | </p><p>Advanced users may note that there is a second parameter named <b>index</b> which can be applied to the <b><image></b> tag, which specifies the index of the icon in the image file (0-based). Specific use of this attribute can be used to associate the same image index with several commands, thus avoiding duplication. For example: | ||
</p> | </p> | ||
<div dir="ltr" style="text-align: left;"><div class="source-xml" style="font-family: monospace;"><pre | <div dir="ltr" style="text-align: left;"><div class="source-xml" style="font-family: monospace;"><pre> <bitmap path="MyIcons.bmp" mask="00FF00"> | ||
<image id="ID_NETWORK_CONNECT" index="0"/> | |||
<image id="ID_NETWORK_DISCONNECT" index="0"/> | |||
<image id="ID_TAB_LIBRARY"/> | |||
</bitmap> | |||
<p>In this example, ID_NETWORK_CONNECT and ID_NETWORK_DISCONNECT would both take on the first icon in the image. The second icon would be assigned to ID_TAB_LIBRARY. | |||
</p> | <bitmap path="MyIcons.bmp"> | ||
<image id="ID_NETWORK_CONNECT" id1="ID_NETWORK_DISCONNECT"/> | |||
<image id="ID_TAB_LIBRARY"/> | |||
</bitmap> | |||
</pre></div></div> | |||
<p>In this example, ID_NETWORK_CONNECT and ID_NETWORK_DISCONNECT would both take on the first icon in the image. The second icon would be assigned to ID_TAB_LIBRARY.</p> |
Latest revision as of 00:04, 2 September 2009
JUST RECOVERED, WHERE IS THAT BOX?
Languages: |
[[::Skinning.commandImages|English]] • [[::Skinning.commandImages/de|Deutsch]] • [[::Skinning.commandImages/es|Español]] • [[::Skinning.commandImages/fr|Français]] • [[::Skinning.commandImages/he|עברית]] • [[::Skinning.commandImages/it|Italiano]] • [[::Skinning.commandImages/nl|Nederlands]] • [[::Skinning.commandImages/pl|Polski]] • [[::Skinning.commandImages/pt|Português]] • [[::Skinning.commandImages/ru|Русский]] • [[::Skinning.commandImages/zh-hant|中文(繁體)]] | e |
Recovered |
The following content has been recovered from the old wiki and pantheraproject*net. Date unknown, but seems links properly. Competent verification needed. OCE. | e |
commandImages
The commandImages provides new icons for different Shareaza commands, replacing the original (default) icons.
Any number of new command icons can be specified, but each must be 16x16 in size. You can load images from .ico files (one image per file), or .bmp image files (many images per file, arranged in a row). Icon files have automatic transparency, while bitmap files need to have a specific transparency colour. By default this is light green (00FF00), but you can specify a different colour.
A visual list of the default icons and their corresponding IDs can be found in <a href="http://shareaza.sourceforge.net/?id=skindocs/xml-default" class="external text" title="http://shareaza.sourceforge.net/?id=skindocs/xml-default">Default.xml</a> and <a href="http://shareaza.sourceforge.net/?id=skindocs/xml-definitions" class="external text" title="http://shareaza.sourceforge.net/?id=skindocs/xml-definitions">Definitions.xml</a> online.
Here is an example from MyIconsSkin.xml:
<?xml version="1.0" encoding="UTF-8"?> <skin xmlns="http://www.shareaza.com/schemas/Skin.xsd" version="1.0"> <manifest name="My Icons Skin" author="Me" type="Skin"/> <commandImages> <bitmap path="MyIcons.bmp" mask="00FF00"> <image id="ID_TAB_HOME"/> <image id="ID_TAB_LIBRARY"/> <image id="ID_TAB_NETWORK"/> <image id="ID_TAB_TRANSFERS"/> <image id="ID_TAB_CONNECT"/> </bitmap> <icon path="MyIcon.ico" id="ID_NETWORK_CONNECT"/> </commandImages> </skin>
In the case of an icon, the target command where the icon is to be used is specified in the id attribute. For a list of command IDs, check out default-en.xml in your skins folder or consult the visual index of icons in <a href="http://shareaza.sourceforge.net/?id=skindocs/xml-default" class="external text" title="http://shareaza.sourceforge.net/?id=skindocs/xml-default">Default.xml</a> and <a href="http://shareaza.sourceforge.net/?id=skindocs/xml-definitions" class="external text" title="http://shareaza.sourceforge.net/?id=skindocs/xml-definitions">Definitions.xml</a> online.
In the case of a bitmap, many icons are stored in the same image. Each icon must be associated with one or more commands. This is done with the <image> tag, which also has an id attribute.
Advanced users may note that there is a second parameter named index which can be applied to the <image> tag, which specifies the index of the icon in the image file (0-based). Specific use of this attribute can be used to associate the same image index with several commands, thus avoiding duplication. For example:
<bitmap path="MyIcons.bmp" mask="00FF00"> <image id="ID_NETWORK_CONNECT" index="0"/> <image id="ID_NETWORK_DISCONNECT" index="0"/> <image id="ID_TAB_LIBRARY"/> </bitmap> <bitmap path="MyIcons.bmp"> <image id="ID_NETWORK_CONNECT" id1="ID_NETWORK_DISCONNECT"/> <image id="ID_TAB_LIBRARY"/> </bitmap>
In this example, ID_NETWORK_CONNECT and ID_NETWORK_DISCONNECT would both take on the first icon in the image. The second icon would be assigned to ID_TAB_LIBRARY.