mittens_ui 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 76c72facca9e7aa37399945d8f44467ac96a1471c4abeeb76f45965ad3aeccc0
4
- data.tar.gz: 7b29e79fe7aa038d8bb12e5299bcb6f07bf30cb3c866e7d034b4e842a7184ac7
3
+ metadata.gz: f806d77471b5b7268e145563d494b2297f911fc9afc5b37892a8c91490b05c42
4
+ data.tar.gz: '08d9e6c8c135b2fded5f7d7b5287fdfbb20037f75cc26e6c5a70cc44d925199e'
5
5
  SHA512:
6
- metadata.gz: c94f656a8bd97f7a3eb497d3fd5b1a1d430972c477216fbbd2a99ca2ec7f194beda429951f3d29eb89b5bcdba29bfa8249500250fe726bfe008fc0dd523b1619
7
- data.tar.gz: 5327faf9eb9c9ddaded5e40af6e4774484ee19d894b31d6423df66a7d2b1565a57e967d8f9fde7b109ad92aa5d685fe7696d070ffeff9266fbf48ff6dc37f196
6
+ metadata.gz: f83e6defaa9b66fc403a67425a40eb3c2c42dd34030b19b74e54cd727c749c94480c4ad2e7ca5de520ae667900b8e8a776d5504a97e144b38d0483a5f3f4a0c0
7
+ data.tar.gz: a78661adfb575a836e514f039eff9e3646a1e2e2b0cbd6c7f615d15eae1f7a1b2432bb18121810210c88c6e67320a979f2e72b1b7fbce71fb37db7c6da9b5ed9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mittens_ui (0.0.1)
4
+ mittens_ui (0.0.2)
5
5
  gtk3
6
6
 
7
7
  GEM
@@ -39,23 +39,23 @@ GEM
39
39
  pango (3.4.3)
40
40
  cairo-gobject (= 3.4.3)
41
41
  gobject-introspection (= 3.4.3)
42
- pkg-config (1.4.2)
42
+ pkg-config (1.4.4)
43
43
  rake (12.3.3)
44
44
  rake-compiler (1.1.1)
45
45
  rake
46
- rspec (3.9.0)
47
- rspec-core (~> 3.9.0)
48
- rspec-expectations (~> 3.9.0)
49
- rspec-mocks (~> 3.9.0)
50
- rspec-core (3.9.2)
51
- rspec-support (~> 3.9.3)
52
- rspec-expectations (3.9.2)
46
+ rspec (3.10.0)
47
+ rspec-core (~> 3.10.0)
48
+ rspec-expectations (~> 3.10.0)
49
+ rspec-mocks (~> 3.10.0)
50
+ rspec-core (3.10.0)
51
+ rspec-support (~> 3.10.0)
52
+ rspec-expectations (3.10.0)
53
53
  diff-lcs (>= 1.2.0, < 2.0)
54
- rspec-support (~> 3.9.0)
55
- rspec-mocks (3.9.1)
54
+ rspec-support (~> 3.10.0)
55
+ rspec-mocks (3.10.0)
56
56
  diff-lcs (>= 1.2.0, < 2.0)
57
- rspec-support (~> 3.9.0)
58
- rspec-support (3.9.3)
57
+ rspec-support (~> 3.10.0)
58
+ rspec-support (3.10.0)
59
59
 
60
60
  PLATFORMS
61
61
  ruby
data/examples/app.rb CHANGED
@@ -26,7 +26,7 @@ MittensUi::Application.Window(app_options) do |window, layout|
26
26
  MittensUi::Alert(window, "Hello #{text_box.text}!")
27
27
  end
28
28
 
29
- slider_opts = { start_value: 1, stop_value: 100 }
29
+ slider_opts = { start_value: 1, stop_value: 100, initial_value: 30 }
30
30
  MittensUi::Slider(layout, slider_opts) do |s|
31
31
  puts "value changed: #{s.value}"
32
32
  end
@@ -1,3 +1,3 @@
1
1
  module MittensUi
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -2,13 +2,17 @@ module MittensUi
2
2
  module Widgets
3
3
  class Slider
4
4
  def initialize(layout, options={}, &block)
5
+ puts "OPS: #{options.inspect}"
5
6
  start_value = options[:start_value].nil? ? 1.0 : options[:start_value]
6
7
  stop_value = options[:stop_value].nil? ? 10.0 : options[:stop_value]
7
8
  step_value = options[:step_value].nil? ? 1.0 : options[:step_value]
9
+ init_value = options[:initial_value].nil? ? 1.0 : options[:initial_value]
8
10
 
9
11
  @scale = Gtk::Scale.new(:horizontal, start_value, stop_value, step_value)
12
+ puts @scale.methods
10
13
  @scale.digits = 0
11
14
  @scale.draw_value = true
15
+ @scale.value = init_value
12
16
 
13
17
  @scale.signal_connect "value_changed" do |scale_widget|
14
18
  block.call(scale_widget)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mittens_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zach Tuttle