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.
Rust archive-managerdesktop-appdual-paneexplorer-alternativefile-browserfile-explorerfile-managerfluent-designgpu-acceleratedgpuimacosmicaproductivityquick-lookrustrust-guitabswindowswindows-11windows-explorer
List & Cards: keep checkbox and icon alignment while renaming (issue 831)
Marcos Gramelichf616d98c7127
diff --git a/crates/rf-app/src/folder_view.rs b/crates/rf-app/src/folder_view.rsindex 5b7c5ea0..a23b1fe6 100644--- a/crates/rf-app/src/folder_view.rs+++ b/crates/rf-app/src/folder_view.rs@@ -4113,14 +4113,23 @@ impl FolderView {let name_text = crate::rtl::display_text(&self.row_label(e, show_ext, renamed.as_ref()));let renaming_here = self.renaming.as_ref().is_some_and(|(i, _)| *i == ei);// Settings › "Show checkboxes when selecting items" in every layout, not only Details (issues 650, 667)- let checks = cx.global::<crate::settings::Settings>().show_checkboxes && !renaming_here;- let list_check = (checks && style == GridStyle::List).then(|| self.selection_check(vi, selected, "cellgrp", &p, cx));- let corner_check = (checks && style != GridStyle::List).then(|| self.selection_check(vi, selected, "cellgrp", &p, cx));+ let show_checkboxes = cx.global::<crate::settings::Settings>().show_checkboxes;+ // (in the List the checkbox sits in the row ahead of the icon, as in Details: dropping it while renaming moved+ // the icon and the edit box to the left, issue 831)+ let list_check = (show_checkboxes && style == GridStyle::List).then(|| self.selection_check(vi, selected, "cellgrp", &p, cx));+ let corner_check = (show_checkboxes && !renaming_here && style != GridStyle::List).then(|| self.selection_check(vi, selected, "cellgrp", &p, cx));// (the rename box replaces the name line; the picture stays where it was: it was an empty box, discussion 610)let base = if style != GridStyle::Tiles && renaming_here {// the rename box replaces the name linelet inp = self.renaming.as_ref().map(|(_, i)| i.clone()).unwrap();- h_flex().px_2().gap_2().items_center().child(div().size(visual_px).flex_shrink_0().flex().items_center().justify_center().child(visual)).child(+ let icon_box = if style == GridStyle::Cards { visual_px + px(4.) } else { visual_px };+ h_flex()+ .px_2()+ .map(|d| if style == GridStyle::Cards { d.gap_3() } else { d.gap_2() })+ .items_center()+ .children(list_check)+ .child(div().size(icon_box).flex_shrink_0().flex().items_center().justify_center().child(visual))+ .child(// the box grows to the left (border + padding) so the text keeps its placediv().flex_1()