Get the channel select looking good

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld
2021-08-30 17:59:13 -07:00
co-authored by Nathan Sobo
parent ff01b52819
commit 73a8fda9c7
10 changed files with 348 additions and 82 deletions
+31 -4
View File
@@ -68,15 +68,34 @@ pub struct ChatPanel {
#[serde(flatten)]
pub container: ContainerStyle,
pub message: ChatMessage,
pub channel_name: TextStyle,
pub channel_name_hash: ContainedLabel,
pub channel_select: ChannelSelect,
}
#[derive(Deserialize)]
pub struct ChatMessage {
pub body: TextStyle,
pub sender: ContainedLabel,
pub timestamp: ContainedLabel,
pub sender: ContainedText,
pub timestamp: ContainedText,
}
#[derive(Deserialize)]
pub struct ChannelSelect {
#[serde(flatten)]
pub container: ContainerStyle,
pub header: ChannelName,
pub item: ChannelName,
pub active_item: ChannelName,
pub hovered_item: ChannelName,
pub hovered_active_item: ChannelName,
pub menu: ContainerStyle,
}
#[derive(Deserialize)]
pub struct ChannelName {
#[serde(flatten)]
pub container: ContainerStyle,
pub hash: ContainedText,
pub name: TextStyle,
}
#[derive(Deserialize)]
@@ -90,6 +109,14 @@ pub struct Selector {
pub active_item: ContainedLabel,
}
#[derive(Deserialize)]
pub struct ContainedText {
#[serde(flatten)]
pub container: ContainerStyle,
#[serde(flatten)]
pub text: TextStyle,
}
#[derive(Deserialize)]
pub struct ContainedLabel {
#[serde(flatten)]