drag-overlay: Don't subclass AdwBin

We override all its APIs
This commit is contained in:
Kévin Commaille 2023-11-09 12:22:40 +01:00
parent 7f8dc352b4
commit 349a2783f1
No known key found for this signature in database
GPG Key ID: 29A48C1F03620416
1 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,6 @@ use gtk::{glib, prelude::*, subclass::prelude::*};
mod imp {
use std::cell::RefCell;
use adw::subclass::prelude::*;
use once_cell::sync::Lazy;
use super::*;
@ -21,10 +20,11 @@ mod imp {
impl ObjectSubclass for DragOverlay {
const NAME: &'static str = "DragOverlay";
type Type = super::DragOverlay;
type ParentType = adw::Bin;
type ParentType = gtk::Widget;
fn class_init(klass: &mut Self::Class) {
klass.set_css_name("dragoverlay");
klass.set_layout_manager_type::<gtk::BinLayout>();
}
}
@ -84,13 +84,13 @@ mod imp {
self.overlay.unparent();
}
}
impl WidgetImpl for DragOverlay {}
impl BinImpl for DragOverlay {}
}
glib::wrapper! {
pub struct DragOverlay(ObjectSubclass<imp::DragOverlay>)
@extends gtk::Widget, adw::Bin;
@extends gtk::Widget;
}
impl DragOverlay {