Permalink
Browse files

Styles, visual enhancements

  • Loading branch information...
1 parent b6567f5 commit 66c71bb044e444fd560b8a4ed77c9f7a4c59db0a @karmi committed Jan 5, 2009
Showing with 27 additions and 15 deletions.
  1. +3 −0 05_interactivity_with_objects.rb
  2. +12 −8 07_interface.rb
  3. +11 −7 08_live_interface.rb
  4. +1 −0 09_uploader.rb
  5. BIN assets/uploader.png
@@ -1,3 +1,6 @@
+# Draw draggable letter on canvas
+# Instantiate with <tt>letter('a')</tt>
+#
class Shoes::Letter < Shoes::Widget
def initialize(l)
View
@@ -6,25 +6,29 @@
background "#EFC"
border "#BE8", :strokewidth => 6
+ style(Shoes::Para, :stroke => "#14190e")
+ LABEL_STYLE = { :margin_bottom => 2 }
+ INPUT_STYLE = { :margin_bottom => 10 }
+
stack do
background "#BE8"
- subtitle "Interface in Shoes", :margin_left => 13
+ subtitle "Interface in Shoes", :stroke => '#14190e', :margin_left => 13
end
@params = {}
stack(:margin => 12) do
- para "Your name"
- @params[:name] = edit_line
+ para( "Your name", LABEL_STYLE)
+ @params[:name] = edit_line(INPUT_STYLE)
- para "Your surname"
- @params[:surname] = edit_line
+ para( "Your surname", LABEL_STYLE)
+ @params[:surname] = edit_line(INPUT_STYLE)
- para "Where do you live"
- @params[:residence] = list_box :items => ['Earth', 'Mars', 'Venus']
+ para( "Where do you live", LABEL_STYLE)
+ @params[:residence] = list_box( INPUT_STYLE.merge :items => ['Earth', 'Mars', 'Venus'])
- button "Send!", :margin_top => 10 do
+ button "Send!", :margin_top => 12 do
msg = "Thanks! You've sent this:\n\n"
@params.each { |key, value| msg << key.to_s.capitalize + ': ' + value.text + "\n" }
alert msg
View
@@ -10,23 +10,27 @@
background "#EFC"
border "#BE8", :strokewidth => 6
+ style(Shoes::Para, :stroke => "#14190e")
+ LABEL_STYLE = { :margin_bottom => 2 }
+ INPUT_STYLE = { :margin_bottom => 10 }
+
stack do
background "#BE8"
- subtitle "Interface in Shoes"
+ subtitle "Interface in Shoes", :stroke => '#14190e', :margin_left => 13
end
@params = {}
stack(:margin => 12) do
- para "Your name"
- @params[:name] = edit_line
+ para( "Your name", LABEL_STYLE)
+ @params[:name] = edit_line(INPUT_STYLE)
- para "Your surname"
- @params[:surname] = edit_line
+ para( "Your surname", LABEL_STYLE)
+ @params[:surname] = edit_line(INPUT_STYLE)
- para "Where do you live"
- @params[:residence] = list_box :items => ['Earth', 'Mars', 'Venus']
+ para( "Where do you live", LABEL_STYLE)
+ @params[:residence] = list_box( INPUT_STYLE.merge :items => ['Earth', 'Mars', 'Venus'])
button "Send!", :margin_top => 10 do
View
@@ -39,6 +39,7 @@ def upload(path)
para( 'For Sinatra!', :stroke => "#999999", :margin => [15, 0, 0, 0]).displace(0, -8)
background "rgb(66, 66, 66, 180)".."rgb(0, 0, 0, 0)", :height => 0.5
background "rgb(66, 66, 66, 100)".."rgb(255, 255, 255, 0)", :height => 20, :bottom => 0
+ image( 'assets/uploader.png' ).move(width-45, 25)
end
stack :margin => [15, 20, 15, 15] do
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 66c71bb

Please sign in to comment.