feat: setup packager and auto-updater

This commit is contained in:
2025-02-11 09:13:08 +07:00
parent 1bb9729e75
commit f5f9b66df5
16 changed files with 76 additions and 67 deletions

View File

@@ -256,8 +256,6 @@ impl StackPanel {
cx.emit(PanelEvent::LayoutChanged);
self.remove_self_if_empty(window, cx);
} else {
println!("Panel not found in stack panel.");
}
}

View File

@@ -299,31 +299,6 @@ impl IntoElement for TextElement {
}
}
/// A debug function to print points as SVG path.
#[allow(unused)]
fn print_points_as_svg_path(line_corners: &Vec<Corners<Point<Pixels>>>, points: &[Point<Pixels>]) {
for corners in line_corners {
println!(
"tl: ({}, {}), tr: ({}, {}), bl: ({}, {}), br: ({}, {})",
corners.top_left.x.0 as i32,
corners.top_left.y.0 as i32,
corners.top_right.x.0 as i32,
corners.top_right.y.0 as i32,
corners.bottom_left.x.0 as i32,
corners.bottom_left.y.0 as i32,
corners.bottom_right.x.0 as i32,
corners.bottom_right.y.0 as i32,
);
}
if !points.is_empty() {
println!("M{},{}", points[0].x.0 as i32, points[0].y.0 as i32);
for p in points.iter().skip(1) {
println!("L{},{}", p.x.0 as i32, p.y.0 as i32);
}
}
}
impl Element for TextElement {
type RequestLayoutState = ();
type PrepaintState = PrepaintState;

View File

@@ -340,12 +340,9 @@ impl NotificationList {
// Sleep for 3 seconds to autohide the notification
cx.spawn_in(window, |_, mut cx| async move {
Timer::after(Duration::from_secs(3)).await;
if let Err(err) = notification.update_in(&mut cx, |note, window, cx| {
_ = notification.update_in(&mut cx, |note, window, cx| {
note.dismiss(&ClickEvent::default(), window, cx)
}) {
println!("failed to auto hide notification: {:?}", err);
}
});
})
.detach();
}