Template:Sandbox: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (tweak)
(tweak)
Line 43: Line 43:


<nowiki>{{</nowiki> Sandbox
<nowiki>{{</nowiki> Sandbox
| element_path = &lt;-- the 'path' or 'qualification' of the elmente &mdash;ie: <tt>gtk, sugar.activity, sugar.graphics ...</tt> --&gt;
| element_path = &lt;!-- the 'path' or 'qualification' of the elmente &mdash;ie: <tt>gtk, sugar.activity, sugar.graphics ...</tt> --&gt;
| element_name = &lt;-- name of the component&mdash;ie: <tt>window, IconButton, ...</tt> --&gt;
| element_name = &lt;!-- name of the component&mdash;ie: <tt>window, IconButton, ...</tt> --&gt;
| description = &lt;-- full text describing the appropriate attributes or peculiarities of the element --&gt;
| description = &lt;!-- full text describing the appropriate attributes or peculiarities of the element --&gt;
| STATE_NORMAL = &lt;-- 'default' state considerations or peculiarities --&gt;
| STATE_NORMAL = &lt;!-- 'default' state considerations or peculiarities --&gt;
| STATE_SELECTED = &lt;-- 'focused' state considerations or peculiarities --&gt;
| STATE_SELECTED = &lt;!-- 'focused' state considerations or peculiarities --&gt;
| STATE_ACTIVE = &lt;-- 'pressed' state considerations or peculiarities --&gt;
| STATE_ACTIVE = &lt;!-- 'pressed' state considerations or peculiarities --&gt;
| STATE_PRELIGHT = &lt;-- 'hover' state considerations or peculiarities --&gt;
| STATE_PRELIGHT = &lt;!-- 'hover' state considerations or peculiarities --&gt;
| STATE_INSENSITIVE = &lt;-- 'inactive' state considerations or peculiarities --&gt;
| STATE_INSENSITIVE = &lt;!-- 'inactive' state considerations or peculiarities --&gt;
<nowiki>}}</nowiki>
<nowiki>}}</nowiki>


Line 61: Line 61:
* Icons should be grey scale. But might be coloured with the XO colors (svg only)
* Icons should be grey scale. But might be coloured with the XO colors (svg only)
* Size of the button is 75 pixels, size of the icon canvas is 55 and suggested icon size is around 45.
* Size of the button is 75 pixels, size of the icon canvas is 55 and suggested icon size is around 45.
| STATE_NORMAL =
| STATE_NORMAL = &lt;!-- 'default' state considerations or peculiarities --&gt;
| STATE_SELECTED = Rounded rectangle 61 pixels, 10 pixels of radius, stroked in white 2.25 points &lt;-- 'focused' state --&gt;
| STATE_SELECTED = Rounded rectangle 61 pixels, 10 pixels of radius, stroked in white 2.25 points &lt;!-- 'focused' state --&gt;
| STATE_ACTIVE = Rounded rectangle 61 pixels, 10 pixels of radius, filled in selection grey &lt;-- 'pressed' state --&gt;
| STATE_ACTIVE = Rounded rectangle 61 pixels, 10 pixels of radius, filled in selection grey &lt;!-- 'pressed' state --&gt;
| STATE_PRELIGHT = Black &lt;-- 'hover' state --&gt;
| STATE_PRELIGHT = Black &lt;!-- 'hover' state --&gt;
| STATE_INSENSITIVE = Fallbacks if no inactive icon is specified.&lt;-- 'inactive' state --&gt;
| STATE_INSENSITIVE = Fallbacks if no inactive icon is specified. &lt;!-- 'inactive' state --&gt;
<nowiki>}}</nowiki>
<nowiki>}}</nowiki>
{{ Sandbox
{{ Sandbox
Line 73: Line 73:
* Icons should be grey scale. But might be coloured with the XO colors (svg only)
* Icons should be grey scale. But might be coloured with the XO colors (svg only)
* Size of the button is 75 pixels, size of the icon canvas is 55 and suggested icon size is around 45.
* Size of the button is 75 pixels, size of the icon canvas is 55 and suggested icon size is around 45.
| STATE_NORMAL = &lt;-- 'default' state considerations or peculiarities --&gt;
| STATE_NORMAL =
| STATE_SELECTED = Rounded rectangle 61 pixels, 10 pixels of radius, stroked in white 2.25 points
| STATE_SELECTED = Rounded rectangle 61 pixels, 10 pixels of radius, stroked in white 2.25 points
| STATE_ACTIVE = Rounded rectangle 61 pixels, 10 pixels of radius, filled in selection grey
| STATE_ACTIVE = Rounded rectangle 61 pixels, 10 pixels of radius, filled in selection grey

Revision as of 17:13, 27 April 2007

Many times you may want to just 'test' an idea for a template, I haven't found a sensible way of fully testing templates by themselves (as they will not get included in the edited version, but rather the saved version).

The idea of this Template:Sandbox is to have that, a simple testing zone that will not interfere with others and avoid leaving a trail of botched attempts.

Please leave this comment/text for others to read.
See Also http://meta.wikimedia.org/wiki/Help:Template
{{{element_path}}}.{{{element_name}}}

{{{description}}}

default {{{STATE_NORMAL}}}
focused {{{STATE_SELECTED}}}
pressed {{{STATE_ACTIVE}}}
hover {{{STATE_PRELIGHT}}}
inactive {{{STATE_INSENSITIVE}}}


Testing Graphics API template

Usage

{{ Sandbox
  | element_path       =  <!-- the 'path' or 'qualification' of the elmente —ie: gtk, sugar.activity, sugar.graphics ... -->
  | element_name       =  <!-- name of the component—ie: window, IconButton, ... -->
  | description        =  <!-- full text describing the appropriate attributes or peculiarities of the element -->
  | STATE_NORMAL       =  <!-- 'default' state considerations or peculiarities -->
  | STATE_SELECTED     =  <!-- 'focused' state considerations or peculiarities -->
  | STATE_ACTIVE       =  <!-- 'pressed' state considerations or peculiarities -->
  | STATE_PRELIGHT     =  <!-- 'hover' state considerations or peculiarities -->
  | STATE_INSENSITIVE  =  <!-- 'inactive' state considerations or peculiarities -->
}}

Samples

{{ Sandbox 
  | element_path       =  sugar.graphics
  | element_name       =  IconButton
  | description        =  * Support for SVG and png.
* Icons should be grey scale. But might be coloured with the XO colors (svg only) 
* Size of the button is 75 pixels, size of the icon canvas is 55 and suggested icon size is around 45.
  | STATE_NORMAL       =  <!-- 'default' state considerations or peculiarities -->
  | STATE_SELECTED     =  Rounded rectangle 61 pixels, 10 pixels of radius, stroked in white 2.25 points <!-- 'focused' state -->
  | STATE_ACTIVE       =  Rounded rectangle 61 pixels, 10 pixels of radius, filled in selection grey <!-- 'pressed' state -->
  | STATE_PRELIGHT     =  Black <!-- 'hover' state -->
  | STATE_INSENSITIVE  =  Fallbacks if no inactive icon is specified. <!-- 'inactive' state -->
 }}
sugar.graphics.IconButton
  • Support for SVG and png.
  • Icons should be grey scale. But might be coloured with the XO colors (svg only)
  • Size of the button is 75 pixels, size of the icon canvas is 55 and suggested icon size is around 45.
default
focused Rounded rectangle 61 pixels, 10 pixels of radius, stroked in white 2.25 points
pressed Rounded rectangle 61 pixels, 10 pixels of radius, filled in selection grey
hover Black
inactive Fallbacks if no inactive icon is specified.