Rename player to players

This commit is contained in:
Marshall Bowers 2023-10-25 16:39:06 +02:00
parent 0867175a4e
commit 437d147935
4 changed files with 6 additions and 6 deletions

View file

@ -75,7 +75,7 @@ pub struct Theme {
pub git_ignored: Hsla, pub git_ignored: Hsla,
pub git_renamed: Hsla, pub git_renamed: Hsla,
pub player: [PlayerTheme; 8], pub players: [PlayerTheme; 8],
} }
#[derive(Clone)] #[derive(Clone)]

View file

@ -57,7 +57,7 @@ pub fn one_dark() -> Theme {
git_conflict: rgba(0xdec184ff).into(), git_conflict: rgba(0xdec184ff).into(),
git_ignored: rgba(0x555a63ff).into(), git_ignored: rgba(0x555a63ff).into(),
git_renamed: rgba(0xdec184ff).into(), git_renamed: rgba(0xdec184ff).into(),
player: [ players: [
PlayerTheme { PlayerTheme {
cursor: rgba(0x74ade8ff).into(), cursor: rgba(0x74ade8ff).into(),
selection: rgba(0x74ade83d).into(), selection: rgba(0x74ade83d).into(),

View file

@ -154,7 +154,7 @@ pub struct ThemeColor {
pub git_ignored: Hsla, pub git_ignored: Hsla,
pub git_renamed: Hsla, pub git_renamed: Hsla,
pub player: [PlayerThemeColors; 8], pub players: [PlayerThemeColors; 8],
} }
impl std::fmt::Debug for ThemeColor { 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_conflict", &self.git_conflict.to_rgb().to_hex())
.field("git_ignored", &self.git_ignored.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("git_renamed", &self.git_renamed.to_rgb().to_hex())
.field("player", &self.player) .field("players", &self.players)
.finish() .finish()
} }
} }

View file

@ -140,12 +140,12 @@ impl Player {
pub fn cursor_color<S: 'static>(&self, cx: &mut ViewContext<S>) -> Hsla { pub fn cursor_color<S: 'static>(&self, cx: &mut ViewContext<S>) -> Hsla {
let theme = theme(cx); 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 { pub fn selection_color<S: 'static>(&self, cx: &mut ViewContext<S>) -> Hsla {
let theme = theme(cx); let theme = theme(cx);
theme.player[self.index].selection theme.players[self.index].selection
} }
pub fn avatar_src(&self) -> &str { pub fn avatar_src(&self) -> &str {