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.

Merge branch 'main' into n/t2

Nate Butlerd0975aacac2a
diff --cc crates/ui2/src/prelude.rs
index 53adc8c0f9e,c3f530d70c8..fbb7ccc5281
--- a/crates/ui2/src/prelude.rs
+++ b/crates/ui2/src/prelude.rs
@@@ -7,36 -7,9 +7,27 @@@ pub use crate::elevation::*
pub use crate::ButtonVariant;
pub use theme2::ActiveTheme;
- use gpui2::{rems, Hsla, Rems};
+ use gpui2::Hsla;
use strum::EnumIter;
- pub fn ui_size(cx: &mut WindowContext, size: f32) -> Rems {
- const UI_SCALE_RATIO: f32 = 0.875;
-
- let settings = user_settings(cx);
-
- rems(*settings.ui_scale * UI_SCALE_RATIO * size)
- }
-
+/// Represents a person with a Zed account's public profile.
+/// All data in this struct should be considered public.
+pub struct PublicActor {
+ pub username: SharedString,
+ pub avatar: SharedString,
+ pub is_contact: bool,
+}
+
+impl PublicActor {
+ pub fn new(username: impl Into<SharedString>, avatar: impl Into<SharedString>) -> Self {
+ Self {
+ username: username.into(),
+ avatar: avatar.into(),
+ is_contact: false,
+ }
+ }
+}
+
#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, EnumIter)]
pub enum FileSystemStatus {
#[default]