mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-07 02:57:34 +00:00
Make it possible to render a single line editor
This commit is contained in:
parent
c7f5888348
commit
a21c49c015
1 changed files with 2 additions and 3 deletions
|
@ -1595,7 +1595,7 @@ impl EditorElement {
|
||||||
&mut self,
|
&mut self,
|
||||||
editor: &mut Editor,
|
editor: &mut Editor,
|
||||||
cx: &mut ViewContext<'_, Editor>,
|
cx: &mut ViewContext<'_, Editor>,
|
||||||
bounds: Bounds<Pixels>,
|
mut bounds: Bounds<Pixels>,
|
||||||
) -> LayoutState {
|
) -> LayoutState {
|
||||||
// let mut size = constraint.max;
|
// let mut size = constraint.max;
|
||||||
// if size.x.is_infinite() {
|
// if size.x.is_infinite() {
|
||||||
|
@ -1673,8 +1673,7 @@ impl EditorElement {
|
||||||
// .min(line_height * max_lines as f32),
|
// .min(line_height * max_lines as f32),
|
||||||
// )
|
// )
|
||||||
} else if let EditorMode::SingleLine = editor_mode {
|
} else if let EditorMode::SingleLine = editor_mode {
|
||||||
todo!()
|
bounds.size.height = line_height.min(bounds.size.height);
|
||||||
// size.set_y(line_height.max(constraint.min_along(Axis::Vertical)))
|
|
||||||
}
|
}
|
||||||
// todo!()
|
// todo!()
|
||||||
// else if size.y.is_infinite() {
|
// else if size.y.is_infinite() {
|
||||||
|
|
Loading…
Reference in a new issue