Skip to content

A fast file manager for Windows and macOS that never freezes: tabs, dual panes, archives as folders, Quick Look-style previews. A File Explorer and Finder alternative written in Rust.

Address bar: the home button and the chevrons are as tall as the folders (835)

gelenmedya1e11f0afe75d
diff --git a/crates/rf-app/src/workspace.rs b/crates/rf-app/src/workspace.rs
index 3325230b..b715669e 100644
--- a/crates/rf-app/src/workspace.rs
+++ b/crates/rf-app/src/workspace.rs
@@ -4427,8 +4427,11 @@ impl Workspace {
let windows_theme = cx.global::<crate::settings::Settings>().windows_file_explorer_theme;
let home_icon = div()
.id("crumb-home")
+ // every part of the path is as tall as the row's text parts, so the whole of what lights up can be clicked
+ .h(px(CRUMB_H))
+ .flex()
+ .items_center()
.px_1()
- .py_0p5()
.rounded(theme::RADIUS_SM)
.hover(|s| s.bg(p.hover))
.child(if windows_theme {
@@ -4444,8 +4447,10 @@ impl Workspace {
let chevron = |id: (&'static str, usize), dir: Option<PathBuf>, p: &Palette, cx: &mut Context<Self>| {
div()
.id(id)
+ .h(px(CRUMB_H))
+ .flex()
+ .items_center()
.px_0p5()
- .py_1()
.rounded(theme::RADIUS_SM)
.hover(|s| s.bg(p.hover))
.child(Icon::new(L::ChevronRight).size(px(12.)).text_color(p.text_tertiary))
@@ -4465,8 +4470,10 @@ impl Workspace {
row = row.child(
div()
.id("crumb-ellipsis")
+ .h(px(CRUMB_H))
+ .flex()
+ .items_center()
.px_1p5()
- .py_0p5()
.rounded(theme::RADIUS_SM)
.text_color(p.text_secondary)
.hover(|s| s.bg(p.hover).text_color(p.text))
@@ -4484,8 +4491,10 @@ impl Workspace {
row = row.child(
div()
.id(("crumb", i))
+ .h(px(CRUMB_H))
+ .flex()
+ .items_center()
.px_1p5()
- .py_0p5()
.rounded(theme::RADIUS_SM)
.whitespace_nowrap()
.when(last, |d| d.font_weight(FontWeight::MEDIUM))
@@ -5880,6 +5889,10 @@ pub fn open_in_ide(dir: PathBuf, ide: String) {
});
}
+/// The height of every part of the address bar's path (the home button, the chevrons, the folders): one height, so each is clickable over
+/// all it lights up (issue 835: the home button and the chevrons were shorter than the folders).
+const CRUMB_H: f32 = 24.0;
+
pub(crate) fn drop_files(paths: &ExternalPaths, dest: PathBuf, cx: &mut App) {
drop_files_then(paths, dest, cx, |_| {});
}