Fix panic with many participants

Conrad Irwin created

Change summary

crates/ui/src/styles/color.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

crates/ui/src/styles/color.rs 🔗

@@ -37,7 +37,7 @@ impl Color {
             Color::Info => cx.theme().status().info,
             Color::Placeholder => cx.theme().colors().text_placeholder,
             Color::Accent => cx.theme().colors().text_accent,
-            Color::Player(i) => cx.theme().styles.player.0[i.clone() as usize].cursor,
+            Color::Player(i) => cx.theme().styles.player.color_for_participant(*i).cursor,
             Color::Error => cx.theme().status().error,
             Color::Selected => cx.theme().colors().text_accent,
             Color::Success => cx.theme().status().success,