Skip to content

Commit

Permalink
add native borders to windows and macos
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscoBSalgueiro committed Feb 15, 2024
1 parent 5f3c9ce commit 2b80522
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 13 deletions.
95 changes: 82 additions & 13 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ oauth2 = "4.4.2"
axum = "0.6.20"
tar = "0.4.40"
sysinfo = "0.29.10"
window-shadows = "0.2.2"

[features]
# by default Tauri runs in production mode
Expand Down
4 changes: 4 additions & 0 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ use crate::{
opening::{get_opening_from_fen, get_opening_from_name, search_opening_name},
};
use tokio::sync::{RwLock, Semaphore};
use window_shadows::set_shadow;

pub type GameData = (i32, Option<String>, Vec<u8>, Option<String>, i32, i32, i32);

Expand Down Expand Up @@ -228,6 +229,9 @@ fn main() {
}
}

#[cfg(any(windows, target_os = "macos"))]
set_shadow(&app.get_window("main").unwrap(), true).unwrap();

Ok(())
})
.manage(AppState::default())
Expand Down

0 comments on commit 2b80522

Please sign in to comment.