Thread click handler through from workspace to language selector

This commit is contained in:
Marshall Bowers 2023-10-10 18:02:08 -04:00
parent c142676b20
commit 95ef61bc45
4 changed files with 46 additions and 18 deletions

View file

@ -4,10 +4,10 @@ use std::sync::Arc;
use gpui3::{Interactive, MouseButton};
use crate::prelude::*;
use crate::{theme, Icon, IconColor, IconElement};
use crate::{theme, ClickHandler, Icon, IconColor, IconElement};
struct IconButtonHandlers<S: 'static + Send + Sync> {
click: Option<Arc<dyn Fn(&mut S, &mut ViewContext<S>) + 'static + Send + Sync>>,
click: Option<ClickHandler<S>>,
}
impl<S: 'static + Send + Sync> Default for IconButtonHandlers<S> {