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

@ -1,4 +1,4 @@
use gtk::Picture;
use gtk::{gdk_pixbuf::Pixbuf, Picture};
pub struct Image {
gobject: Picture,
@ -6,9 +6,9 @@ pub struct Image {
impl Image {
// Construct
pub fn new() -> Self {
pub fn new_from_pixbuf(buffer: &Pixbuf) -> Self {
Self {
gobject: Picture::new(),
gobject: Picture::for_pixbuf(buffer),
}
}