[Update] Add Window Title bar.

[bugfix] Note: I think this is tauri's bug. When I try to resize the window and hovered dragable area, I could see resize cursor but it work as a dragging the window behavior that should't be.
Updated npm packages but still not work so I  managed it as adding margin-top by referring Discord title bar.
This commit is contained in:
Sakamoto Shiina
2024-10-09 22:00:30 +09:00
parent 98d57bdc13
commit 61f50215d7
16 changed files with 797 additions and 740 deletions

View File

@@ -3,19 +3,26 @@
// use tauri::command;
use tauri::Manager;
use window_shadows::set_shadow;
fn main() {
tauri::Builder::default()
.setup(|app| {
let main_window = app.get_window("main").unwrap(); // `main_window` is declared here for all builds
#[cfg(debug_assertions)]
app.get_window("main").unwrap().open_devtools(); // `main` is the first window from tauri.conf.json without an explicit label
{ main_window.open_devtools(); }
#[cfg(any(windows, target_os = "macos"))]
set_shadow(main_window, true).unwrap();
Ok(())
})
.invoke_handler(tauri::generate_handler![get_font_list])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
use font_kit::{source::SystemSource};
use std::collections::HashSet;