Skinning.commandImages: Difference between revisions

From Shareaza Wiki
Jump to navigation Jump to search
mNo edit summary
(Code formatting correction)
 
Line 1: Line 1:
JUST RECOVERED, WHERE (piiiiiii....) IS THAT BOX??
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. OCE.}}
{{RecoveredPage|The following content has been recovered from the old wiki and pantheraproject*net. Date unknown, but seems links properly. Competent verification needed. OCE.}}


</a><h2> <span class="mw-headline">commandImages</span></h2>
<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> <span class="re1">&lt;?xml</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span> <span class="re0">encoding</span>=<span class="st0">&quot;UTF-8&quot;</span><span class="re2">?&gt;</span>
<div dir="ltr" style="text-align: left;"><div class="source-xml" style="font-family: monospace;"><pre> &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  <span class="re1">&lt;skin</span> <span class="re0">xmlns</span>=<span class="st0">&quot;http://www.shareaza.com/schemas/Skin.xsd&quot;</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span><span class="re2">&gt;</span>
  &lt;skin xmlns=&quot;http://www.shareaza.com/schemas/Skin.xsd&quot; version=&quot;1.0&quot;&gt;
   <span class="re1">&lt;manifest</span> <span class="re0">name</span>=<span class="st0">&quot;My Icons Skin&quot;</span> <span class="re0">author</span>=<span class="st0">&quot;Me&quot;</span> <span class="re0">type</span>=<span class="st0">&quot;Skin&quot;</span><span class="re2">/&gt;</span>
   &lt;manifest name=&quot;My Icons Skin&quot; author=&quot;Me&quot; type=&quot;Skin&quot;/&gt;
   <span class="re1">&lt;commandImages<span class="re2">&gt;</span></span>
   &lt;commandImages&gt;
   <span class="re1">&lt;bitmap</span> <span class="re0">path</span>=<span class="st0">&quot;MyIcons.bmp&quot;</span> <span class="re0">mask</span>=<span class="st0">&quot;00FF00&quot;</span><span class="re2">&gt;</span>
   &lt;bitmap path=&quot;MyIcons.bmp&quot; mask=&quot;00FF00&quot;&gt;
     <span class="re1">&lt;image</span> <span class="re0">id</span>=<span class="st0">&quot;ID_TAB_HOME&quot;</span><span class="re2">/&gt;</span>
     &lt;image id=&quot;ID_TAB_HOME&quot;/&gt;
     <span class="re1">&lt;image</span> <span class="re0">id</span>=<span class="st0">&quot;ID_TAB_LIBRARY&quot;</span><span class="re2">/&gt;</span>
     &lt;image id=&quot;ID_TAB_LIBRARY&quot;/&gt;
     <span class="re1">&lt;image</span> <span class="re0">id</span>=<span class="st0">&quot;ID_TAB_NETWORK&quot;</span><span class="re2">/&gt;</span>
     &lt;image id=&quot;ID_TAB_NETWORK&quot;/&gt;
     <span class="re1">&lt;image</span> <span class="re0">id</span>=<span class="st0">&quot;ID_TAB_TRANSFERS&quot;</span><span class="re2">/&gt;</span>
     &lt;image id=&quot;ID_TAB_TRANSFERS&quot;/&gt;
     <span class="re1">&lt;image</span> <span class="re0">id</span>=<span class="st0">&quot;ID_TAB_CONNECT&quot;</span><span class="re2">/&gt;</span>
     &lt;image id=&quot;ID_TAB_CONNECT&quot;/&gt;
   <span class="re1">&lt;/bitmap<span class="re2">&gt;</span></span>
   &lt;/bitmap&gt;
   <span class="re1">&lt;icon</span> <span class="re0">path</span>=<span class="st0">&quot;MyIcon.ico&quot;</span> <span class="re0">id</span>=<span class="st0">&quot;ID_NETWORK_CONNECT&quot;</span><span class="re2">/&gt;</span>
   &lt;icon path=&quot;MyIcon.ico&quot; id=&quot;ID_NETWORK_CONNECT&quot;/&gt;
   <span class="re1">&lt;/commandImages<span class="re2">&gt;</span></span>
   &lt;/commandImages&gt;
  <span class="re1">&lt;/skin<span class="re2">&gt;</span></span></pre></div></div>
  &lt;/skin&gt;</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>&lt;image&gt;</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>&lt;image&gt;</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>&lt;image&gt;</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>&lt;image&gt;</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> <span class="re1">&lt;bitmap</span> <span class="re0">path</span>=<span class="st0">&quot;MyIcons.bmp&quot;</span> <span class="re0">mask</span>=<span class="st0">&quot;00FF00&quot;</span><span class="re2">&gt;</span>
<div dir="ltr" style="text-align: left;"><div class="source-xml" style="font-family: monospace;"><pre> &lt;bitmap path=&quot;MyIcons.bmp&quot; mask=&quot;00FF00&quot;&gt;
   <span class="re1">&lt;image</span> <span class="re0">id</span>=<span class="st0">&quot;ID_NETWORK_CONNECT&quot;</span> <span class="re0">index</span>=<span class="st0">&quot;0&quot;</span><span class="re2">/&gt;</span>
   &lt;image id=&quot;ID_NETWORK_CONNECT&quot; index=&quot;0&quot;/&gt;
   <span class="re1">&lt;image</span> <span class="re0">id</span>=<span class="st0">&quot;ID_NETWORK_DISCONNECT&quot;</span> <span class="re0">index</span>=<span class="st0">&quot;0&quot;</span><span class="re2">/&gt;</span>
   &lt;image id=&quot;ID_NETWORK_DISCONNECT&quot; index=&quot;0&quot;/&gt;
   <span class="re1">&lt;image</span> <span class="re0">id</span>=<span class="st0">&quot;ID_TAB_LIBRARY&quot;</span><span class="re2">/&gt;</span>
  &lt;image id=&quot;ID_TAB_LIBRARY&quot;/&gt;
  <span class="re1">&lt;/bitmap<span class="re2">&gt;</span></span></pre></div></div>
&lt;/bitmap&gt;
<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>
&lt;bitmap path=&quot;MyIcons.bmp&quot;&gt;
   &lt;image id=&quot;ID_NETWORK_CONNECT&quot; id1=&quot;ID_NETWORK_DISCONNECT&quot;/&gt;
  &lt;image id=&quot;ID_TAB_LIBRARY&quot;/&gt;
  &lt;/bitmap&gt;
</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.