Class: Kelp::ImageDialog
Instance Method Summary collapse
-
#initialize(pixbuf, title = "") ⇒ ImageDialog
constructor
A new instance of ImageDialog.
- #pixbuf=(pixbuf) ⇒ Object
Constructor Details
#initialize(pixbuf, title = "") ⇒ ImageDialog
Returns a new instance of ImageDialog.
119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/sh_util.rb', line 119 def initialize(pixbuf, title="") super(title, nil, nil, [Stock::CANCEL, Dialog::RESPONSE_NONE]) @image = Image.new(pixbuf) vbox.pack_start @image, true, true, 8 if pixbuf self.width_request = pixbuf.width + 16 self.height_request = size[1] + pixbuf.height + 16 end vbox.show_all signal_connect('response') { destroy } end |
Instance Method Details
#pixbuf=(pixbuf) ⇒ Object
134 135 136 |
# File 'lib/sh_util.rb', line 134 def pixbuf=(pixbuf) @image.pixbuf = pixbuf end |