Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Remove project divider in titlebar
Nate Butler97d187bba7a3
diff --git a/crates/collab_ui/src/collab_titlebar_item.rs b/crates/collab_ui/src/collab_titlebar_item.rsindex 684ddca08de..bd94c85f959 100644--- a/crates/collab_ui/src/collab_titlebar_item.rs+++ b/crates/collab_ui/src/collab_titlebar_item.rs@@ -213,7 +213,6 @@ impl CollabTitlebarItem {.map(|branch| util::truncate_and_trailoff(&branch, MAX_BRANCH_NAME_LENGTH));let project_style = theme.titlebar.project_menu_button.clone();let git_style = theme.titlebar.git_menu_button.clone();- let divider_style = theme.titlebar.project_name_divider.clone();let item_spacing = theme.titlebar.item_spacing;let mut ret = Flex::row().with_child(@@ -249,13 +248,6 @@ impl CollabTitlebarItem {if let Some(git_branch) = branch_prepended {ret = ret.with_child(Flex::row()- .with_child(- Label::new("/", divider_style.text)- .contained()- .with_style(divider_style.container)- .aligned()- .left(),- ).with_child(Stack::new().with_child(diff --git a/styles/src/component/index.ts b/styles/src/component/index.tsnew file mode 100644index 00000000000..f2cbc7b26a0--- /dev/null+++ b/styles/src/component/index.ts@@ -0,0 +1,6 @@+export * from "./icon_button"+export * from "./indicator"+export * from "./input"+export * from "./tab"+export * from "./tab_bar_button"+export * from "./text_button"diff --git a/styles/src/component/text_button.ts b/styles/src/component/text_button.tsindex b73d20ff1a7..8333d9e81a9 100644--- a/styles/src/component/text_button.ts+++ b/styles/src/component/text_button.ts@@ -74,31 +74,31 @@ export function text_button({hovered: disabled? {}: {- background: background(- layer ?? theme.lowest,- color,- "hovered"- ),- color: foreground(- layer ?? theme.lowest,- color,- "hovered"- ),- },+ background: background(+ layer ?? theme.lowest,+ color,+ "hovered"+ ),+ color: foreground(+ layer ?? theme.lowest,+ color,+ "hovered"+ ),+ },clicked: disabled? {}: {- background: background(- layer ?? theme.lowest,- color,- "pressed"- ),- color: foreground(- layer ?? theme.lowest,- color,- "pressed"- ),- },+ background: background(+ layer ?? theme.lowest,+ color,+ "pressed"+ ),+ color: foreground(+ layer ?? theme.lowest,+ color,+ "pressed"+ ),+ },},})}diff --git a/styles/src/element/index.ts b/styles/src/element/index.tsindex d41b4e2cc3b..0586399fb1c 100644--- a/styles/src/element/index.ts+++ b/styles/src/element/index.ts@@ -1,4 +1,6 @@import { interactive, Interactive } from "./interactive"import { toggleable, Toggleable } from "./toggle"+export * from "./padding"+export * from "./margin"export { interactive, Interactive, toggleable, Toggleable }diff --git a/styles/src/component/margin.ts b/styles/src/element/margin.tssimilarity index 100%rename from styles/src/component/margin.tsrename to styles/src/element/margin.tsdiff --git a/styles/src/component/padding.ts b/styles/src/element/padding.tssimilarity index 100%rename from styles/src/component/padding.tsrename to styles/src/element/padding.tsdiff --git a/styles/src/style_tree/titlebar.ts b/styles/src/style_tree/titlebar.tsindex 9fb439f618e..672907b22cc 100644--- a/styles/src/style_tree/titlebar.ts+++ b/styles/src/style_tree/titlebar.ts@@ -1,8 +1,6 @@-import { icon_button, toggleable_icon_button } from "../component/icon_button"-import { toggleable_text_button } from "../component/text_button"+import { icon_button, toggleable_icon_button, toggleable_text_button } from "../component"import { interactive, toggleable } from "../element"-import { useTheme } from "../theme"-import { with_opacity } from "../theme/color"+import { useTheme, with_opacity } from "../theme"import { background, border, foreground, text } from "./components"const ITEM_SPACING = 8@@ -185,12 +183,10 @@ export function titlebar(): any {height: 400,},- // Project- project_name_divider: text(theme.lowest, "sans", "variant"),-project_menu_button: toggleable_text_button(theme, {- color: "base",+ color: "base"}),+git_menu_button: toggleable_text_button(theme, {color: "variant",}),diff --git a/styles/src/theme/index.ts b/styles/src/theme/index.tsindex ca8aaa461fa..47110940f55 100644--- a/styles/src/theme/index.ts+++ b/styles/src/theme/index.ts@@ -23,3 +23,4 @@ export * from "./create_theme"export * from "./ramps"export * from "./syntax"export * from "./theme_config"+export * from "./color"