Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Rename `player` to `players`

Marshall Bowers437d14793562
diff --git a/crates/theme2/src/theme2.rs b/crates/theme2/src/theme2.rs
index 1e93bb08d77..e02a73c528f 100644
--- a/crates/theme2/src/theme2.rs
+++ b/crates/theme2/src/theme2.rs
@@ -75,7 +75,7 @@ pub struct Theme {
pub git_ignored: Hsla,
pub git_renamed: Hsla,
- pub player: [PlayerTheme; 8],
+ pub players: [PlayerTheme; 8],
}
#[derive(Clone)]
diff --git a/crates/theme2/src/themes/one_dark.rs b/crates/theme2/src/themes/one_dark.rs
index 50f9b3922a5..678d41e07f2 100644
--- a/crates/theme2/src/themes/one_dark.rs
+++ b/crates/theme2/src/themes/one_dark.rs
@@ -57,7 +57,7 @@ pub fn one_dark() -> Theme {
git_conflict: rgba(0xdec184ff).into(),
git_ignored: rgba(0x555a63ff).into(),
git_renamed: rgba(0xdec184ff).into(),
- player: [
+ players: [
PlayerTheme {
cursor: rgba(0x74ade8ff).into(),
selection: rgba(0x74ade83d).into(),
diff --git a/crates/ui2/src/color.rs b/crates/ui2/src/color.rs
index 966df6b65bf..6bc5b723795 100644
--- a/crates/ui2/src/color.rs
+++ b/crates/ui2/src/color.rs
@@ -154,7 +154,7 @@ pub struct ThemeColor {
pub git_ignored: Hsla,
pub git_renamed: Hsla,
- pub player: [PlayerThemeColors; 8],
+ pub players: [PlayerThemeColors; 8],
}
impl std::fmt::Debug for ThemeColor {
@@ -245,7 +245,7 @@ impl std::fmt::Debug for ThemeColor {
.field("git_conflict", &self.git_conflict.to_rgb().to_hex())
.field("git_ignored", &self.git_ignored.to_rgb().to_hex())
.field("git_renamed", &self.git_renamed.to_rgb().to_hex())
- .field("player", &self.player)
+ .field("players", &self.players)
.finish()
}
}
diff --git a/crates/ui2/src/elements/player.rs b/crates/ui2/src/elements/player.rs
index 6d22f0e3b2c..12457e4f582 100644
--- a/crates/ui2/src/elements/player.rs
+++ b/crates/ui2/src/elements/player.rs
@@ -140,12 +140,12 @@ impl Player {
pub fn cursor_color<S: 'static>(&self, cx: &mut ViewContext<S>) -> Hsla {
let theme = theme(cx);
- theme.player[self.index].cursor
+ theme.players[self.index].cursor
}
pub fn selection_color<S: 'static>(&self, cx: &mut ViewContext<S>) -> Hsla {
let theme = theme(cx);
- theme.player[self.index].selection
+ theme.players[self.index].selection
}
pub fn avatar_src(&self) -> &str {