class ColorSwatch
Flow Box¶ ↑
GtkFlowBox allows flexible and responsive grids which reflow as needed and support sorting and filtering. The children of a GtkFlowBox are regular widgets
Public Class Methods
new(color)
click to toggle source
Calls superclass method
Gtk::Button::new
# File gtk3/sample/gtk-demo/flowbox.rb, line 13 def initialize(color) super(:label => nil) area = Gtk::DrawingArea.new area.set_size_request(24, 24) area.signal_connect "draw" do |_widget, cr| rgba = Gdk::RGBA.parse(color) if rgba cr.set_source_rgba(rgba.to_a) cr.paint end end add(area) show_all end