Class: Gtk::ScaleButtonDemo

Inherits:
Box
  • Object
show all
Defined in:
lib/gtk_paradise/examples/gtk3/060_scale_button_demo.rb

Instance Method Summary collapse

Methods inherited from Box

#add_space, #left_aligned_text, #text

Constructor Details

#initializeScaleButtonDemo

#

initialize

#


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/gtk_paradise/examples/gtk3/060_scale_button_demo.rb', line 20

def initialize
  super(:vertical)
  scale = ::Gtk::ScaleButton.new
  scale.set_value(50)
  # scale.set_valign(0.5) # :end)
  # scale.set_halign(0.5) # :end)
  add(scale)
  self.vexpand = true
  self.hexpand = true
  scale.set_icons(
    %w( go-bottom go-top system-run )
  )
  scale.signal_connect(:value_changed) { |_widget, value|
    puts "value changed: #{value}"
  }
end