1use gpui::{prelude::*, Action};
2
3use ui::prelude::*;
4
5use super::platform_generic::GenericWindowControls;
6
7#[derive(IntoElement)]
8pub struct LinuxWindowControls {
9 close_window_action: Box<dyn Action>,
10}
11
12impl LinuxWindowControls {
13 pub fn new(close_window_action: Box<dyn Action>) -> Self {
14 Self {
15 close_window_action,
16 }
17 }
18}
19
20impl RenderOnce for LinuxWindowControls {
21 fn render(self, _cx: &mut WindowContext) -> impl IntoElement {
22 GenericWindowControls::new(self.close_window_action.boxed_clone()).into_any_element()
23 }
24}