fix titlebar
Some checks failed
Rust / build (ubuntu-latest, stable) (push) Failing after 1m18s
Rust / build (ubuntu-latest, stable) (pull_request) Failing after 1m18s

This commit is contained in:
2026-01-17 09:08:24 +07:00
parent ca38cc23d9
commit f5fcabd1aa

View File

@@ -24,7 +24,6 @@ impl RenderOnce for LinuxWindowControls {
fn render(self, window: &mut Window, _cx: &mut App) -> impl IntoElement { fn render(self, window: &mut Window, _cx: &mut App) -> impl IntoElement {
h_flex() h_flex()
.id("linux-window-controls") .id("linux-window-controls")
.px_2()
.gap_2() .gap_2()
.on_mouse_down(MouseButton::Left, |_, _, cx| cx.stop_propagation()) .on_mouse_down(MouseButton::Left, |_, _, cx| cx.stop_propagation())
.child(WindowControl::new( .child(WindowControl::new(
@@ -104,14 +103,14 @@ impl RenderOnce for WindowControl {
this.child(Icon::new(self.fallback).flex_grow().small()) this.child(Icon::new(self.fallback).flex_grow().small())
} }
}) })
.on_mouse_move(|_, _window, cx| cx.stop_propagation()) .on_mouse_move(|_ev, _window, cx| cx.stop_propagation())
.on_click(move |_, window, cx| { .on_click(move |_ev, window, cx| {
cx.stop_propagation(); cx.stop_propagation();
match self.kind { match self.kind {
LinuxControl::Minimize => window.minimize_window(), LinuxControl::Minimize => window.minimize_window(),
LinuxControl::Restore => window.zoom_window(), LinuxControl::Restore => window.zoom_window(),
LinuxControl::Maximize => window.zoom_window(), LinuxControl::Maximize => window.zoom_window(),
LinuxControl::Close => {} LinuxControl::Close => cx.quit(),
} }
}) })
} }