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 | 7554d0b06f53969d56402f3343c35063a7b4b56a (patch) | |
tree | 81258b81d9111c762cb80ca56141cd1f8ce9d0f9 /ext/tk/sample/tkextlib/vu/pie.rb | |
parent | d3caa0ae0ba3a85108ff11919b227a2ddcf290eb (diff) | |
download | ruby-7554d0b06f53969d56402f3343c35063a7b4b56a.tar.gz ruby-7554d0b06f53969d56402f3343c35063a7b4b56a.tar.xz ruby-7554d0b06f53969d56402f3343c35063a7b4b56a.zip |
* ext/tk/lib/tk/*: untabify
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@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 a567f840a..ed598d623 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 |