mirror of
https://github.com/zed-industries/zed.git
synced 2024-09-18 18:08:07 +03:00
Remove project divider in titlebar
This commit is contained in:
parent
2af5fc5030
commit
97d187bba7
@ -213,7 +213,6 @@ impl CollabTitlebarItem {
|
|||||||
.map(|branch| util::truncate_and_trailoff(&branch, MAX_BRANCH_NAME_LENGTH));
|
.map(|branch| util::truncate_and_trailoff(&branch, MAX_BRANCH_NAME_LENGTH));
|
||||||
let project_style = theme.titlebar.project_menu_button.clone();
|
let project_style = theme.titlebar.project_menu_button.clone();
|
||||||
let git_style = theme.titlebar.git_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 item_spacing = theme.titlebar.item_spacing;
|
||||||
|
|
||||||
let mut ret = Flex::row().with_child(
|
let mut ret = Flex::row().with_child(
|
||||||
@ -249,13 +248,6 @@ impl CollabTitlebarItem {
|
|||||||
if let Some(git_branch) = branch_prepended {
|
if let Some(git_branch) = branch_prepended {
|
||||||
ret = ret.with_child(
|
ret = ret.with_child(
|
||||||
Flex::row()
|
Flex::row()
|
||||||
.with_child(
|
|
||||||
Label::new("/", divider_style.text)
|
|
||||||
.contained()
|
|
||||||
.with_style(divider_style.container)
|
|
||||||
.aligned()
|
|
||||||
.left(),
|
|
||||||
)
|
|
||||||
.with_child(
|
.with_child(
|
||||||
Stack::new()
|
Stack::new()
|
||||||
.with_child(
|
.with_child(
|
||||||
|
6
styles/src/component/index.ts
Normal file
6
styles/src/component/index.ts
Normal file
@ -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"
|
@ -74,31 +74,31 @@ export function text_button({
|
|||||||
hovered: disabled
|
hovered: disabled
|
||||||
? {}
|
? {}
|
||||||
: {
|
: {
|
||||||
background: background(
|
background: background(
|
||||||
layer ?? theme.lowest,
|
layer ?? theme.lowest,
|
||||||
color,
|
color,
|
||||||
"hovered"
|
"hovered"
|
||||||
),
|
),
|
||||||
color: foreground(
|
color: foreground(
|
||||||
layer ?? theme.lowest,
|
layer ?? theme.lowest,
|
||||||
color,
|
color,
|
||||||
"hovered"
|
"hovered"
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
clicked: disabled
|
clicked: disabled
|
||||||
? {}
|
? {}
|
||||||
: {
|
: {
|
||||||
background: background(
|
background: background(
|
||||||
layer ?? theme.lowest,
|
layer ?? theme.lowest,
|
||||||
color,
|
color,
|
||||||
"pressed"
|
"pressed"
|
||||||
),
|
),
|
||||||
color: foreground(
|
color: foreground(
|
||||||
layer ?? theme.lowest,
|
layer ?? theme.lowest,
|
||||||
color,
|
color,
|
||||||
"pressed"
|
"pressed"
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
import { interactive, Interactive } from "./interactive"
|
import { interactive, Interactive } from "./interactive"
|
||||||
import { toggleable, Toggleable } from "./toggle"
|
import { toggleable, Toggleable } from "./toggle"
|
||||||
|
|
||||||
|
export * from "./padding"
|
||||||
|
export * from "./margin"
|
||||||
export { interactive, Interactive, toggleable, Toggleable }
|
export { interactive, Interactive, toggleable, Toggleable }
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
import { icon_button, toggleable_icon_button } from "../component/icon_button"
|
import { icon_button, toggleable_icon_button, toggleable_text_button } from "../component"
|
||||||
import { toggleable_text_button } from "../component/text_button"
|
|
||||||
import { interactive, toggleable } from "../element"
|
import { interactive, toggleable } from "../element"
|
||||||
import { useTheme } from "../theme"
|
import { useTheme, with_opacity } from "../theme"
|
||||||
import { with_opacity } from "../theme/color"
|
|
||||||
import { background, border, foreground, text } from "./components"
|
import { background, border, foreground, text } from "./components"
|
||||||
|
|
||||||
const ITEM_SPACING = 8
|
const ITEM_SPACING = 8
|
||||||
@ -185,12 +183,10 @@ export function titlebar(): any {
|
|||||||
height: 400,
|
height: 400,
|
||||||
},
|
},
|
||||||
|
|
||||||
// Project
|
|
||||||
project_name_divider: text(theme.lowest, "sans", "variant"),
|
|
||||||
|
|
||||||
project_menu_button: toggleable_text_button(theme, {
|
project_menu_button: toggleable_text_button(theme, {
|
||||||
color: "base",
|
color: "base"
|
||||||
}),
|
}),
|
||||||
|
|
||||||
git_menu_button: toggleable_text_button(theme, {
|
git_menu_button: toggleable_text_button(theme, {
|
||||||
color: "variant",
|
color: "variant",
|
||||||
}),
|
}),
|
||||||
|
@ -23,3 +23,4 @@ export * from "./create_theme"
|
|||||||
export * from "./ramps"
|
export * from "./ramps"
|
||||||
export * from "./syntax"
|
export * from "./syntax"
|
||||||
export * from "./theme_config"
|
export * from "./theme_config"
|
||||||
|
export * from "./color"
|
||||||
|
Loading…
Reference in New Issue
Block a user