Open main menu

Difference between revisions of "GUI Themes/Specs"

1,864 bytes added ,  23:40, 3 February 2007
→‎'gradients' section: initial explanation of the gradients section
(→‎'gradients' section: initial explanation of the gradients section)
Line 343: Line 343:
==== 'gradients' section ====
==== 'gradients' section ====


TODO
In the 'gradients' section the gradient factors for the different widget/dialog types are defined.
 
Some example define:
 
gradient_dialog_main=1
 
Which is for the background of the launcher dialog.
 
To see what this value does here's how the calculate the color of a row in a widget/dialog:
 
calcGradient(firstLineColor, lastLineColor, currentLine, maxLineNumber, factor)
      maxLineNumber = maxLineNumber / factor
      currentLine = currentLine * factor
      if currentLine >= maxLineNumber then
          return lastLineColor
      return firstLineColor + (((lastLineColor - firstLineColor) * currentLine) / maxLineNumber)
 
Of course that's somewhat simplified. Now we come to some examples:
 
The color values we use in our examples:
 
{|
| bgcolor="#D2720A" | firstLineColor=210 114 10
|-
| bgcolor="#EFC418" | lastLineColor=239 196 24
|}
 
If we would draw a rect with 10 lines and a factor of 1 the colors would look like:
 
{|
| bgcolor="#D2720A" | line0=210 114 10
|-
| bgcolor="#D57B0B" | line1=213 123 11
|-
| bgcolor="#D8840D" | line2=216 132 13
|-
| bgcolor="#DB8D0E" | line3=219 141 14
|-
| bgcolor="#DE9610" | line4=222 150 16
|-
| bgcolor="#E29F11" | line5=226 159 17
|-
| bgcolor="#E5A813" | line6=229 168 19
|-
| bgcolor="#E8B114" | line7=232 177 20
|-
| bgcolor="#EBBA16" | line8=235 186 22
|-
| bgcolor="#EFC418" | line9=239 196 24
|}
 
If we would draw a the same rect with a factor of 2 the colors would look like:
 
{|
| bgcolor="#D2720A" | line0=210 114 10
|-
| bgcolor="#E09B11" | line1=224 155 17
|-
| bgcolor="#EFC418" | line2=239 196 24
|-
| bgcolor="#EFC418" | line3=239 196 24
|-
| bgcolor="#EFC418" | line4=239 196 24
|-
| bgcolor="#EFC418" | line5=239 196 24
|-
| bgcolor="#EFC418" | line6=239 196 24
|-
| bgcolor="#EFC418" | line7=239 196 24
|-
| bgcolor="#EFC418" | line8=239 196 24
|-
| bgcolor="#EFC418" | line9=239 196 24
|}


==== 'extra' section ====
==== 'extra' section ====
561

edits