Module: CryptopunksGui::View::StyleOptionsFrame

Included in:
CryptopunksGui
Defined in:
app/view/style_options_frame.rb

Instance Method Summary collapse

Instance Method Details

#led_style_options_frame(image:) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'app/view/style_options_frame.rb', line 4

def led_style_options_frame(image: )
  frame {
    padding 0
    
    label {
      grid row: 0, column: 0, column_weight: 0
      text 'Spacing:'
    }
    spinbox {
      grid row: 0, column: 1
      from 1
      to 72
      text <=> [image, :led_spacing]
    }
    
    checkbutton {
      grid row: 0, column: 2
      variable <=> [image, :led_round_corner]
    }
    label {
      grid row: 0, column: 3
      text 'Round Corner'
      
      on('Button-1') do
        image.led_round_corner = !image.led_round_corner
      end
    }
  }
end

#no_style_options_frameObject



51
52
53
54
55
56
57
# File 'app/view/style_options_frame.rb', line 51

def no_style_options_frame
  frame { # filler
    padding 0
    height 0
    width 0
  }
end

#sketch_style_options_frame(image:) ⇒ Object



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'app/view/style_options_frame.rb', line 34

def sketch_style_options_frame(image: )
  frame {
    padding 0
    
    label {
      grid row: 0, column: 0, column_weight: 0
      text 'Line:'
    }
    spinbox {
      grid row: 0, column: 1
      from 1
      to 72
      text <=> [image, :sketch_line]
    }
  }
end