1
0
Fork 0
forked from wry/wry

all: use trait upcasting

This commit is contained in:
Julian Orth 2025-04-03 16:47:24 +02:00
parent f0caafc862
commit 09e5f89174
44 changed files with 90 additions and 269 deletions

View file

@ -77,7 +77,6 @@ impl TrayItemData {
pub trait DynTrayItem: Node {
fn send_current_configure(&self);
fn data(&self) -> &TrayItemData;
fn into_node(self: Rc<Self>) -> Rc<dyn Node>;
fn set_position(&self, abs_pos: Rect, rel_pos: Rect);
fn destroy_popups(&self);
fn destroy_node(&self);
@ -93,10 +92,6 @@ impl<T: TrayItem> DynTrayItem for T {
<Self as TrayItem>::data(self)
}
fn into_node(self: Rc<Self>) -> Rc<dyn Node> {
self
}
fn set_position(&self, abs_pos: Rect, rel_pos: Rect) {
let data = self.data();
data.surface