feat: rebase libcosmic onto iced 0.14
This commit is contained in:
parent
adb938420e
commit
f62abcea4e
6 changed files with 1432 additions and 1418 deletions
40
src/main.rs
40
src/main.rs
|
|
@ -949,7 +949,7 @@ impl App {
|
|||
|
||||
sections.push(
|
||||
widget::row::with_children(vec![
|
||||
widget::horizontal_space().into(),
|
||||
widget::space::horizontal().into(),
|
||||
widget::button::standard(fl!("import"))
|
||||
.on_press(Message::ColorSchemeImport(color_scheme_kind))
|
||||
.into(),
|
||||
|
|
@ -1003,7 +1003,7 @@ impl App {
|
|||
|
||||
let mut groups = Vec::new();
|
||||
//TODO: fix text input focus going outside bounds
|
||||
groups.push(widget::horizontal_space().into());
|
||||
groups.push(widget::space::horizontal().into());
|
||||
groups.push(
|
||||
widget::text_input::search_input(fl!("type-to-search"), &self.shortcut_search_value)
|
||||
.id(self.shortcut_search_id.clone())
|
||||
|
|
@ -1269,7 +1269,7 @@ impl App {
|
|||
])
|
||||
.spacing(space_xxxs)
|
||||
.into(),
|
||||
widget::horizontal_space().into(),
|
||||
widget::space::horizontal().into(),
|
||||
widget::toggler(profile.drain_on_exit)
|
||||
.on_toggle(move |t| Message::ProfileHold(profile_id, t))
|
||||
.into(),
|
||||
|
|
@ -1292,7 +1292,7 @@ impl App {
|
|||
}
|
||||
|
||||
let add_profile = widget::row::with_children(vec![
|
||||
widget::horizontal_space().into(),
|
||||
widget::space::horizontal().into(),
|
||||
widget::button::standard(fl!("add-profile"))
|
||||
.on_press(Message::ProfileNew)
|
||||
.into(),
|
||||
|
|
@ -3362,7 +3362,7 @@ impl Application for App {
|
|||
widget::tooltip::Position::Top,
|
||||
)
|
||||
.into(),
|
||||
widget::horizontal_space().into(),
|
||||
widget::space::horizontal().into(),
|
||||
button::custom(icon_cache_get("window-close-symbolic", 16))
|
||||
.on_press(Message::Find(false))
|
||||
.padding(space_xxs)
|
||||
|
|
@ -3428,22 +3428,24 @@ impl Application for App {
|
|||
}
|
||||
_ => None,
|
||||
}),
|
||||
Subscription::run_with_id(
|
||||
TypeId::of::<TerminalEventSubscription>(),
|
||||
stream::channel(100, |mut output| async move {
|
||||
let (event_tx, mut event_rx) = mpsc::unbounded_channel();
|
||||
output.send(Message::TermEventTx(event_tx)).await.unwrap();
|
||||
Subscription::run_with(TypeId::of::<TerminalEventSubscription>(), |_| {
|
||||
stream::channel(
|
||||
100,
|
||||
|mut output: iced::futures::channel::mpsc::Sender<Message>| async move {
|
||||
let (event_tx, mut event_rx) = mpsc::unbounded_channel();
|
||||
output.send(Message::TermEventTx(event_tx)).await.unwrap();
|
||||
|
||||
while let Some((pane, entity, event)) = event_rx.recv().await {
|
||||
output
|
||||
.send(Message::TermEvent(pane, entity, event))
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
while let Some((pane, entity, event)) = event_rx.recv().await {
|
||||
output
|
||||
.send(Message::TermEvent(pane, entity, event))
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
panic!("terminal event channel closed");
|
||||
}),
|
||||
),
|
||||
panic!("terminal event channel closed");
|
||||
},
|
||||
)
|
||||
}),
|
||||
cosmic_config::config_subscription(
|
||||
TypeId::of::<ConfigSubscription>(),
|
||||
Self::APP_ID.into(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue