Get the channel select looking good

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld
2021-08-30 17:59:13 -07:00
co-authored by Nathan Sobo
parent ff01b52819
commit 73a8fda9c7
10 changed files with 348 additions and 82 deletions
+2 -2
View File
@@ -193,7 +193,7 @@ impl Pane {
row.add_child(
Expanded::new(
1.0,
MouseEventHandler::new::<Tab, _, _>(item.id(), cx, |mouse_state, cx| {
MouseEventHandler::new::<Tab, _, _, _>(item.id(), cx, |mouse_state, cx| {
let title = item.title(cx);
let mut border = border.clone();
@@ -317,7 +317,7 @@ impl Pane {
let close_color = current_color.unwrap_or(theme.workspace.tab.icon_close);
let icon = Svg::new("icons/x.svg").with_color(close_color);
MouseEventHandler::new::<TabCloseButton, _, _>(item_id, cx, |mouse_state, _| {
MouseEventHandler::new::<TabCloseButton, _, _, _>(item_id, cx, |mouse_state, _| {
if mouse_state.hovered {
Container::new(icon.with_color(Color::white()).boxed())
.with_background_color(if mouse_state.clicked {
+2 -2
View File
@@ -76,7 +76,7 @@ impl Sidebar {
&settings.theme.workspace.sidebar_icon
};
enum SidebarButton {}
MouseEventHandler::new::<SidebarButton, _, _>(item.view.id(), cx, |_, _| {
MouseEventHandler::new::<SidebarButton, _, _, _>(item.view.id(), cx, |_, _| {
ConstrainedBox::new(
Align::new(
ConstrainedBox::new(
@@ -133,7 +133,7 @@ impl Sidebar {
) -> ElementBox {
let width = self.width.clone();
let side = self.side;
MouseEventHandler::new::<Self, _, _>(self.side.id(), &mut cx, |_, _| {
MouseEventHandler::new::<Self, _, _, _>(self.side.id(), &mut cx, |_, _| {
Container::new(Empty::new().boxed())
.with_style(&settings.theme.workspace.sidebar.resize_handle)
.boxed()