lib/circule/gui.rb in circule-0.1.3 vs lib/circule/gui.rb in circule-0.1.4

- old
+ new

@@ -68,34 +68,36 @@ def create_gui @root ||= root { title 'Circule GUI' - frame { - entry { text <=> [self, :hex] } + scrollbar_frame { + xscrollbar false - label { text 'bit0:' } - spinbox { from 0; to 255; text <=> [self, :bit0] } - label { text 'step:' } - spinbox { from 4; to 64; text <=> [self, :step] } - label { text 'bitn:' } - spinbox { from 0; to 255; text <=> [self, :bitn] } - label { text 'canvas:' } - spinbox { from 24; to 96; text <=> [self, :canvas] } - label { text 'ox:' } - spinbox { from -96; to 96; text <=> [self, :ox] } - label { text 'oy:' } - spinbox { from -96; to 96; text <=> [self, :oy] } - label { text 'scale:' } - spinbox { from 1; to 24; text <=> [self, :scale] } + entry { text <=> [self, :hex] ; grid row: 1, column: 1, column_span: 2, column_weight: 1 } + label { text 'bit0:' ; grid row: 2, column: 1, column_span: 1, column_weight: 0 } + spinbox { from 0; to 255; text <=> [self, :bit0] ; grid row: 2, column: 2, column_span: 1, column_weight: 1 } + label { text 'step:' ; grid row: 3, column: 1, column_span: 1, column_weight: 0 } + spinbox { from 4; to 64; text <=> [self, :step] ; grid row: 3, column: 2, column_span: 1, column_weight: 1 } + label { text 'bitn:' ; grid row: 4, column: 1, column_span: 1, column_weight: 0 } + spinbox { from 0; to 255; text <=> [self, :bitn] ; grid row: 4, column: 2, column_span: 1, column_weight: 1 } + label { text 'canvas:' ; grid row: 5, column: 1, column_span: 1, column_weight: 0 } + spinbox { from 24; to 96; text <=> [self, :canvas] ; grid row: 5, column: 2, column_span: 1, column_weight: 1 } + label { text 'ox:' ; grid row: 6, column: 1, column_span: 1, column_weight: 0 } + spinbox { from -96; to 96; text <=> [self, :ox] ; grid row: 6, column: 2, column_span: 1, column_weight: 1 } + label { text 'oy:' ; grid row: 7, column: 1, column_span: 1, column_weight: 0 } + spinbox { from -96; to 96; text <=> [self, :oy] ; grid row: 7, column: 2, column_span: 1, column_weight: 1 } + label { text 'scale:' ; grid row: 8, column: 1, column_span: 1, column_weight: 0 } + spinbox { from 1; to 24; text <=> [self, :scale] ; grid row: 8, column: 2, column_span: 1, column_weight: 1 } + frame { - @image_label = label { anchor 'center' } + @image_label = label { anchor 'center' } ; grid row: 9, column: 1, column_span: 2, column_weight: 1 } - button { text 'Open'; command { open } } - button { text 'Save'; command { save } } - button { text 'Exit'; command { exit(0) } } + button { text 'Open'; command { open } ; grid row: 10, column: 1, column_span: 2, column_weight: 1 } + button { text 'Save'; command { save } ; grid row: 11, column: 1, column_span: 2, column_weight: 1 } + button { text 'Exit'; command { exit(0) } ; grid row: 12, column: 1, column_span: 2, column_weight: 1 } } } end def open(source = nil)