Round corners in the chat panel's input editor
This commit is contained in:
@@ -65,6 +65,11 @@ corner_radius = 6
|
||||
border = { color = "#000000", width = 1 }
|
||||
background = "$surface.0"
|
||||
|
||||
[chat_panel.input_editor_container]
|
||||
background = "$surface.1"
|
||||
corner_radius = 6
|
||||
padding = 6
|
||||
|
||||
[chat_panel.input_editor]
|
||||
text = "$text.1.color"
|
||||
placeholder_text = "$text.2.color"
|
||||
|
||||
@@ -236,9 +236,14 @@ impl ChatPanel {
|
||||
}
|
||||
|
||||
fn render_input_box(&self) -> ElementBox {
|
||||
ConstrainedBox::new(ChildView::new(self.input_editor.id()).boxed())
|
||||
.with_max_height(100.)
|
||||
.boxed()
|
||||
let theme = &self.settings.borrow().theme;
|
||||
Container::new(
|
||||
ConstrainedBox::new(ChildView::new(self.input_editor.id()).boxed())
|
||||
.with_max_height(100.)
|
||||
.boxed(),
|
||||
)
|
||||
.with_style(&theme.chat_panel.input_editor_container)
|
||||
.boxed()
|
||||
}
|
||||
|
||||
fn render_channel_name(
|
||||
|
||||
@@ -68,6 +68,7 @@ pub struct ChatPanel {
|
||||
pub container: ContainerStyle,
|
||||
pub message: ChatMessage,
|
||||
pub channel_select: ChannelSelect,
|
||||
pub input_editor_container: ContainerStyle,
|
||||
pub input_editor: InputEditorStyle,
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ impl Sidebar {
|
||||
side,
|
||||
items: Default::default(),
|
||||
active_item_ix: None,
|
||||
width: Rc::new(RefCell::new(100.)),
|
||||
width: Rc::new(RefCell::new(200.)),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user