Remove some todo!'s
This commit is contained in:
parent
aa1d2d2f24
commit
625c9d8980
14 changed files with 18 additions and 211 deletions
|
@ -247,105 +247,6 @@ pub mod simple_message_notification {
|
|||
}))
|
||||
}
|
||||
}
|
||||
// todo!()
|
||||
// impl View for MessageNotification {
|
||||
// fn ui_name() -> &'static str {
|
||||
// "MessageNotification"
|
||||
// }
|
||||
|
||||
// fn render(&mut self, cx: &mut gpui::ViewContext<Self>) -> gpui::AnyElement<Self> {
|
||||
// let theme = theme::current(cx).clone();
|
||||
// let theme = &theme.simple_message_notification;
|
||||
|
||||
// enum MessageNotificationTag {}
|
||||
|
||||
// let click_message = self.click_message.clone();
|
||||
// let message = match &self.message {
|
||||
// NotificationMessage::Text(text) => {
|
||||
// Text::new(text.to_owned(), theme.message.text.clone()).into_any()
|
||||
// }
|
||||
// NotificationMessage::Element(e) => e(theme.message.text.clone(), cx),
|
||||
// };
|
||||
// let on_click = self.on_click.clone();
|
||||
// let has_click_action = on_click.is_some();
|
||||
|
||||
// Flex::column()
|
||||
// .with_child(
|
||||
// Flex::row()
|
||||
// .with_child(
|
||||
// message
|
||||
// .contained()
|
||||
// .with_style(theme.message.container)
|
||||
// .aligned()
|
||||
// .top()
|
||||
// .left()
|
||||
// .flex(1., true),
|
||||
// )
|
||||
// .with_child(
|
||||
// MouseEventHandler::new::<Cancel, _>(0, cx, |state, _| {
|
||||
// let style = theme.dismiss_button.style_for(state);
|
||||
// Svg::new("icons/x.svg")
|
||||
// .with_color(style.color)
|
||||
// .constrained()
|
||||
// .with_width(style.icon_width)
|
||||
// .aligned()
|
||||
// .contained()
|
||||
// .with_style(style.container)
|
||||
// .constrained()
|
||||
// .with_width(style.button_width)
|
||||
// .with_height(style.button_width)
|
||||
// })
|
||||
// .with_padding(Padding::uniform(5.))
|
||||
// .on_click(MouseButton::Left, move |_, this, cx| {
|
||||
// this.dismiss(&Default::default(), cx);
|
||||
// })
|
||||
// .with_cursor_style(CursorStyle::PointingHand)
|
||||
// .aligned()
|
||||
// .constrained()
|
||||
// .with_height(cx.font_cache().line_height(theme.message.text.font_size))
|
||||
// .aligned()
|
||||
// .top()
|
||||
// .flex_float(),
|
||||
// ),
|
||||
// )
|
||||
// .with_children({
|
||||
// click_message
|
||||
// .map(|click_message| {
|
||||
// MouseEventHandler::new::<MessageNotificationTag, _>(
|
||||
// 0,
|
||||
// cx,
|
||||
// |state, _| {
|
||||
// let style = theme.action_message.style_for(state);
|
||||
|
||||
// Flex::row()
|
||||
// .with_child(
|
||||
// Text::new(click_message, style.text.clone())
|
||||
// .contained()
|
||||
// .with_style(style.container),
|
||||
// )
|
||||
// .contained()
|
||||
// },
|
||||
// )
|
||||
// .on_click(MouseButton::Left, move |_, this, cx| {
|
||||
// if let Some(on_click) = on_click.as_ref() {
|
||||
// on_click(cx);
|
||||
// this.dismiss(&Default::default(), cx);
|
||||
// }
|
||||
// })
|
||||
// // Since we're not using a proper overlay, we have to capture these extra events
|
||||
// .on_down(MouseButton::Left, |_, _, _| {})
|
||||
// .on_up(MouseButton::Left, |_, _, _| {})
|
||||
// .with_cursor_style(if has_click_action {
|
||||
// CursorStyle::PointingHand
|
||||
// } else {
|
||||
// CursorStyle::Arrow
|
||||
// })
|
||||
// })
|
||||
// .into_iter()
|
||||
// })
|
||||
// .into_any()
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
pub trait NotifyResultExt {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue