mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-05 06:52:19 +03:00
Merge pull request #2202 from zed-industries/petros/z-86-replace-terminal-tab-title-with-an-icon
Replace terminal tab title with an icon
This commit is contained in:
commit
9a729a2e64
@ -248,15 +248,15 @@ impl Item for ProjectSearchView {
|
|||||||
tab_theme: &theme::Tab,
|
tab_theme: &theme::Tab,
|
||||||
cx: &gpui::AppContext,
|
cx: &gpui::AppContext,
|
||||||
) -> ElementBox {
|
) -> ElementBox {
|
||||||
let settings = cx.global::<Settings>();
|
|
||||||
let search_theme = &settings.theme.search;
|
|
||||||
Flex::row()
|
Flex::row()
|
||||||
.with_child(
|
.with_child(
|
||||||
Svg::new("icons/magnifying_glass_12.svg")
|
Svg::new("icons/magnifying_glass_12.svg")
|
||||||
.with_color(tab_theme.label.text.color)
|
.with_color(tab_theme.label.text.color)
|
||||||
.constrained()
|
.constrained()
|
||||||
.with_width(search_theme.tab_icon_width)
|
.with_width(tab_theme.icon_width)
|
||||||
.aligned()
|
.aligned()
|
||||||
|
.contained()
|
||||||
|
.with_margin_right(tab_theme.spacing)
|
||||||
.boxed(),
|
.boxed(),
|
||||||
)
|
)
|
||||||
.with_children(self.model.read(cx).active_query.as_ref().map(|query| {
|
.with_children(self.model.read(cx).active_query.as_ref().map(|query| {
|
||||||
@ -264,8 +264,6 @@ impl Item for ProjectSearchView {
|
|||||||
|
|
||||||
Label::new(query_text, tab_theme.label.clone())
|
Label::new(query_text, tab_theme.label.clone())
|
||||||
.aligned()
|
.aligned()
|
||||||
.contained()
|
|
||||||
.with_margin_left(search_theme.tab_icon_spacing)
|
|
||||||
.boxed()
|
.boxed()
|
||||||
}))
|
}))
|
||||||
.boxed()
|
.boxed()
|
||||||
|
@ -589,11 +589,16 @@ impl Item for TerminalView {
|
|||||||
|
|
||||||
Flex::row()
|
Flex::row()
|
||||||
.with_child(
|
.with_child(
|
||||||
Label::new(title, tab_theme.label.clone())
|
gpui::elements::Svg::new("icons/terminal_12.svg")
|
||||||
|
.with_color(tab_theme.label.text.color)
|
||||||
|
.constrained()
|
||||||
|
.with_width(tab_theme.icon_width)
|
||||||
.aligned()
|
.aligned()
|
||||||
.contained()
|
.contained()
|
||||||
|
.with_margin_right(tab_theme.spacing)
|
||||||
.boxed(),
|
.boxed(),
|
||||||
)
|
)
|
||||||
|
.with_child(Label::new(title, tab_theme.label.clone()).aligned().boxed())
|
||||||
.boxed()
|
.boxed()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,8 +257,6 @@ pub struct Search {
|
|||||||
pub match_background: Color,
|
pub match_background: Color,
|
||||||
pub match_index: ContainedText,
|
pub match_index: ContainedText,
|
||||||
pub results_status: TextStyle,
|
pub results_status: TextStyle,
|
||||||
pub tab_icon_width: f32,
|
|
||||||
pub tab_icon_spacing: f32,
|
|
||||||
pub dismiss_button: Interactive<IconButton>,
|
pub dismiss_button: Interactive<IconButton>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,8 +29,6 @@ export default function search(colorScheme: ColorScheme) {
|
|||||||
return {
|
return {
|
||||||
// TODO: Add an activeMatchBackground on the rust side to differenciate between active and inactive
|
// TODO: Add an activeMatchBackground on the rust side to differenciate between active and inactive
|
||||||
matchBackground: withOpacity(foreground(layer, "accent"), 0.4),
|
matchBackground: withOpacity(foreground(layer, "accent"), 0.4),
|
||||||
tabIconSpacing: 8,
|
|
||||||
tabIconWidth: 14,
|
|
||||||
optionButton: {
|
optionButton: {
|
||||||
...text(layer, "mono", "on"),
|
...text(layer, "mono", "on"),
|
||||||
background: background(layer, "on"),
|
background: background(layer, "on"),
|
||||||
|
@ -24,7 +24,7 @@ export default function tabBar(colorScheme: ColorScheme) {
|
|||||||
spacing: 8,
|
spacing: 8,
|
||||||
|
|
||||||
// Close icons
|
// Close icons
|
||||||
iconWidth: 8,
|
iconWidth: 14,
|
||||||
iconClose: foreground(layer, "variant"),
|
iconClose: foreground(layer, "variant"),
|
||||||
iconCloseActive: foreground(layer, "hovered"),
|
iconCloseActive: foreground(layer, "hovered"),
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user