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
Merge pull request #704: Windows look: File Explorer's own measures and font
gelenmedya13113d06a8ed
diff --cc crates/rf-app/src/folder_view.rsindex 2b68c8d7,e66d11aa..a950399a--- a/crates/rf-app/src/folder_view.rs+++ b/crates/rf-app/src/folder_view.rs@@@ -7602,9 -7558,11 +7615,11 @@@ fn tile_name_room(size: usize, compact}const DEFAULT_GRID_SIZE: u8 = 2;/// Details row heights for the "Size" slider (30 = the classic one; 22 = as tight as File Explorer's compact rows, asked for on Threads).-const ROW_SIZES: [f32; 5] = [22., 30., 36., 44., 52.];+pub(crate) const ROW_SIZES: [f32; 5] = [22., 30., 36., 44., 52.];/// The same with "Compact items" on (Explorer's compact view: its rows are 22 px at the default size).const COMPACT_ROW_SIZES: [f32; 5] = [20., 22., 28., 34., 42.];+ /// The same with File Explorer's measures (`explorer_metrics`): its Details rows are 28 px apart at 100 % (Windows 11, classic look).+ const EXPLORER_ROW_SIZES: [f32; 5] = [22., 28., 34., 42., 50.];/// What "Compact items" takes off a tile's height: the picture's 4 px frame, the 4 px gap under it and 4 of the cell's 8 px padding.const COMPACT_TILE_SAVE: f32 = 12.;/// A line of the List layout, and the same with compact spacing (8 px less, as a Details row of the middle size).diff --cc crates/rf-app/src/settings.rsindex 73b44ac2,8ee79bd7..23777f48--- a/crates/rf-app/src/settings.rs+++ b/crates/rf-app/src/settings.rs@@@ -1934,16 -1933,17 +1950,24 @@@ pub fn apply_component_theme(cx: &mut A// The component root paints the theme background under every window; keep it clear so// the Mica backdrop shows through (our own surfaces bring their own fills).Theme::update(cx, |t| t.background = gpui_kit::transparent_black());+ // Selected text in the inputs (the address bar, rename, search) in the accent: the toolkit's own light selection was all but+ // invisible on our light surfaces (issue 726).+ Theme::update(cx, |t| {+ let dark = t.mode.is_dark();+ let p = if dark { crate::theme::Palette::dark() } else { crate::theme::Palette::light() };+ t.selection = p.accent.opacity(if dark { 0.45 } else { 0.32 });+ });// the chosen font, else Windows 11's own typeface (optical sizes) when present+ let explorer_font = {+ let s = cx.global::<Settings>();+ s.windows_file_explorer_theme && s.explorer_metrics+ };if let Some(f) = cx.global::<Settings>().font.clone() {Theme::update(cx, |t| t.font_family = f.into());+ } else if explorer_font {+ // with Explorer's measures, its typeface too: the classic File Explorer writes in Segoe UI, not in Windows 11's Segoe UI+ // Variable (other shapes, side by side)+ Theme::update(cx, |t| t.font_family = "Segoe UI".into());} else if std::path::Path::new(r"C:\Windows\Fonts\SegUIVar.ttf").exists() {Theme::update(cx, |t| t.font_family = "Segoe UI Variable Text".into());}