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.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/sh_util.rb', line 106 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
121 122 123 |
# File 'lib/sh_util.rb', line 121 def pixbuf=(pixbuf) @image.pixbuf = pixbuf end |