You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by sc...@apache.org on 2010/02/12 19:55:17 UTC

svn commit: r909555 - in /incubator/wookie/trunk/widgets/butterfly: images/splat.png index.html scripts/butterfly.js

Author: scottbw
Date: Fri Feb 12 18:55:16 2010
New Revision: 909555

URL: http://svn.apache.org/viewvc?rev=909555&view=rev
Log:
A few usability enhancements to the Butterfly widget (thanks to Samantha Wilson, age 4, for the suggestions :-)

Added:
    incubator/wookie/trunk/widgets/butterfly/images/splat.png   (with props)
Modified:
    incubator/wookie/trunk/widgets/butterfly/index.html
    incubator/wookie/trunk/widgets/butterfly/scripts/butterfly.js

Added: incubator/wookie/trunk/widgets/butterfly/images/splat.png
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/butterfly/images/splat.png?rev=909555&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/wookie/trunk/widgets/butterfly/images/splat.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: incubator/wookie/trunk/widgets/butterfly/index.html
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/butterfly/index.html?rev=909555&r1=909554&r2=909555&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/butterfly/index.html (original)
+++ incubator/wookie/trunk/widgets/butterfly/index.html Fri Feb 12 18:55:16 2010
@@ -35,11 +35,16 @@
       #toolbox{
         position:absolute;
         margin-top: 300px;
+        text-align:center;
+        background: black;
+        width: 400px;
+        height: 26px;
       }
       button {
         border: 0;
-        width: 41px;
-        height: 10px;
+        width: 32px;
+        border: 1px solid gray;
+        height: 20px;
         cursor: pointer;
       }
     --></style>
@@ -65,6 +70,8 @@
         <button style="background-color: #909"  onclick="Controller.setRGB(128,0,128)"></button>
         <button style="background-color: #9CF"  onclick="Controller.setRGB(128,192,255)"></button>
         <button style="background-color: black"  onclick="Controller.setRGB(0,0,0)"></button>
+        <button style="background-color: white"  onclick="Controller.setRGB(255,255,255)"></button>
+        <button style="background: url(images/splat.png) no-repeat"  onclick="Controller.fill()"></button>
     </div>
   </body>
 </html>
\ No newline at end of file

Modified: incubator/wookie/trunk/widgets/butterfly/scripts/butterfly.js
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/butterfly/scripts/butterfly.js?rev=909555&r1=909554&r2=909555&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/butterfly/scripts/butterfly.js (original)
+++ incubator/wookie/trunk/widgets/butterfly/scripts/butterfly.js Fri Feb 12 18:55:16 2010
@@ -9,6 +9,11 @@
     setRGB: function(r,g,b){
         this.red=r;this.green=g;this.blue=b;
     },
+    
+    fill: function(){
+        context.fillStyle = "rgb("+this.red+","+this.green+","+this.blue+")";
+    	context.fillRect(0,0,400,300);
+    },
 
     init: function(){
         init_canvas();