diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-11 04:51:21 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-11 04:51:21 +0000 |
commit | 3514110b89bee5c37e308b4ca887e66dfe841456 (patch) | |
tree | d280d8542cc44d1cd1a75e8ec87b1f9d231561b7 /ext/tk/sample/tkextlib/vu/pie.rb | |
parent | 05f5928c9d0f094d1e7e21a9bd9d8a8fc2f1a805 (diff) | |
download | ruby-3514110b89bee5c37e308b4ca887e66dfe841456.tar.gz |
* ext/tk/lib/tk/*: untabify
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/tkextlib/vu/pie.rb')
-rw-r--r-- | ext/tk/sample/tkextlib/vu/pie.rb | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/ext/tk/sample/tkextlib/vu/pie.rb b/ext/tk/sample/tkextlib/vu/pie.rb index a567f840a0..ed598d6233 100644 --- a/ext/tk/sample/tkextlib/vu/pie.rb +++ b/ext/tk/sample/tkextlib/vu/pie.rb @@ -27,7 +27,7 @@ Tk.grid(pie, :sticky=>:news) Tk.grid(f, :sticky=>:ew) Tk.pack(fast_btn, slow_btn, quit_btn, - :in=>f, :side=>:left, :fill=>:both, :expand=>true, :padx=>6, :pady=>4) + :in=>f, :side=>:left, :fill=>:both, :expand=>true, :padx=>6, :pady=>4) Tk.root.grid_columnconfigure(0, :weight=>1) Tk.root.grid_rowconfigure(0, :weight=>1) @@ -37,20 +37,20 @@ priv = { } pie.bind('ButtonPress-1', proc{|w, x, y| - priv[:x] = x - priv[:y] = y - priv[:pie_in] = (w.winfo_width/1.8 > x) - priv[:angle] = w[:angle] - priv[:origin] = w[:origin] - }, '%W %x %y') + priv[:x] = x + priv[:y] = y + priv[:pie_in] = (w.winfo_width/1.8 > x) + priv[:angle] = w[:angle] + priv[:origin] = w[:origin] + }, '%W %x %y') pie.bind('B1-Motion', proc{|w, x, y| - if priv[:pie_in] - w.configure(:angle=>priv[:angle] + (priv[:y] - y)/3, - :origin=>(priv[:origin] + - ((w.winfo_height/2.2 > y)? -1: 1) * - (priv[:x] - x)/3) % 360) - end - }, '%W %x %y') + if priv[:pie_in] + w.configure(:angle=>priv[:angle] + (priv[:y] - y)/3, + :origin=>(priv[:origin] + + ((w.winfo_height/2.2 > y)? -1: 1) * + (priv[:x] - x)/3) % 360) + end + }, '%W %x %y') Tk.mainloop |