Skip to content

Commit

Permalink
add full width option
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacdonaldson committed Oct 21, 2024
1 parent 0fc33d3 commit 8a62604
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions assets/settings/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions crates/file_finder/src/file_finder_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ pub enum FileFinderWidth {
Medium,
Large,
XLarge,
Full,
}

impl FileFinderWidth {
Expand All @@ -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();
Expand Down

0 comments on commit 8a62604

Please sign in to comment.