diff --git a/assets/settings/default.json b/assets/settings/default.json index 7944a564a63a9c..3e8983e25a6c17 100644 --- a/assets/settings/default.json +++ b/assets/settings/default.json @@ -530,6 +530,8 @@ // "window_width": "large", // 4. Extra Large width: // "window_width": "xlarge" + // 5. Fullscreen width: + // "window_width": "full" "window_width": "medium" }, // Whether or not to remove any trailing whitespace from lines of a buffer diff --git a/crates/file_finder/src/file_finder_settings.rs b/crates/file_finder/src/file_finder_settings.rs index 920d5e0ccc6703..48e1dc58631913 100644 --- a/crates/file_finder/src/file_finder_settings.rs +++ b/crates/file_finder/src/file_finder_settings.rs @@ -41,6 +41,7 @@ pub enum FileFinderWidth { Medium, Large, XLarge, + Full, } impl FileFinderWidth { @@ -52,12 +53,17 @@ impl FileFinderWidth { FileFinderWidth::Medium => 1024., FileFinderWidth::Large => 768., FileFinderWidth::XLarge => 512., + FileFinderWidth::Full => 0., }; Pixels(padding_val) } pub fn calc_width(&self, window_width: Pixels) -> Pixels { + if self == &FileFinderWidth::Full { + return window_width; + } + let min_window_width_px = Pixels(FileFinderWidth::MIN_WINDOW_WIDTH_PX); let padding_px = self.padding_px();