mirror of https://github.com/sgoudham/neovide.git
Buttonless option for macOS (#1076)
* Buttonless option for macOS * Properly export PATH on macOS when ran from Finder #1072 * Merge conflicts resolved * Refactoring frame options * Adding frame file; forgot to add * Updating window files * Updated from revisions; .vscode folder added to .gitignore * Formatting * Remove comment of shadow option in frame decoration. * Fix transparency for buttonless * General fix for buttonless and transparency * Formatting * revert unecessary changes Co-authored-by: Keith Simmons <keith@the-simmons.net> Co-authored-by: Keith Simmons <keithsim@microsoft.com>macos-click-through
parent
9cfac28ac8
commit
3efc3c1759
@ -0,0 +1,30 @@
|
||||
// Options for the frame decorations
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub enum Frame {
|
||||
Full,
|
||||
#[cfg(target_os = "macos")]
|
||||
Transparent,
|
||||
#[cfg(target_os = "macos")]
|
||||
Buttonless,
|
||||
None,
|
||||
}
|
||||
|
||||
impl Default for Frame {
|
||||
fn default() -> Frame {
|
||||
Frame::Full
|
||||
}
|
||||
}
|
||||
|
||||
impl Frame {
|
||||
pub fn from_string(decoration: String) -> Frame {
|
||||
match decoration.to_lowercase().as_str() {
|
||||
"full" => Frame::Full,
|
||||
#[cfg(target_os = "macos")]
|
||||
"transparent" => Frame::Transparent,
|
||||
#[cfg(target_os = "macos")]
|
||||
"buttonless" => Frame::Buttonless,
|
||||
"none" => Frame::None,
|
||||
_ => Frame::Full,
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue