Improve the appearance of project panel filename editor
* Always layout single-line editors with a fixed height * Preserve directory chevron when editing folder names * Allow theming the filename editor Co-authored-by: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
co-authored by
Antonio Scandurra
parent
333b4aaf4e
commit
8fdc5c9be3
@@ -875,6 +875,12 @@ impl Element for EditorElement {
|
||||
.max(constraint.min_along(Axis::Vertical))
|
||||
.min(line_height * max_lines as f32),
|
||||
)
|
||||
} else if let EditorMode::SingleLine = snapshot.mode {
|
||||
size.set_y(
|
||||
line_height
|
||||
.min(constraint.max_along(Axis::Vertical))
|
||||
.max(constraint.min_along(Axis::Vertical)),
|
||||
)
|
||||
} else if size.y().is_infinite() {
|
||||
size.set_y(scroll_height);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user