draft images support

This commit is contained in:
yggverse 2024-10-26 23:10:34 +03:00
parent 44c68675b2
commit 5415b7e212
2 changed files with 6 additions and 5 deletions

View file

@ -7,6 +7,7 @@ use status::Status;
use text::Text;
use gtk::{
gdk_pixbuf::Pixbuf,
gio::SimpleAction,
glib::{GString, Uri},
prelude::{BoxExt, WidgetExt},
@ -34,10 +35,10 @@ impl Content {
}
// Actions
pub fn set_image(&self) {
pub fn set_image(&self, buffer: &Pixbuf) {
self.clean();
let image = Image::new();
let image = Image::new_from_pixbuf(buffer);
self.gobject.append(image.gobject());
}