🐛 decorations
This commit is contained in:
@@ -22,11 +22,10 @@ pub fn get_window(app: &mut App, config: PakeConfig, _data_dir: PathBuf) -> Wind
|
|||||||
let mut window_builder = WindowBuilder::new(app, "pake", url)
|
let mut window_builder = WindowBuilder::new(app, "pake", url)
|
||||||
.title("")
|
.title("")
|
||||||
.user_agent(user_agent)
|
.user_agent(user_agent)
|
||||||
.decorations(true)
|
.visible(false) // Prevent initial shaking
|
||||||
.resizable(window_config.resizable)
|
.resizable(window_config.resizable)
|
||||||
.fullscreen(window_config.fullscreen)
|
.fullscreen(window_config.fullscreen)
|
||||||
.inner_size(window_config.width, window_config.height)
|
.inner_size(window_config.width, window_config.height)
|
||||||
.visible(false) // Prevent initial shaking
|
|
||||||
.initialization_script(include_str!("../inject/style.js"))
|
.initialization_script(include_str!("../inject/style.js"))
|
||||||
.initialization_script(include_str!("../inject/index.js"));
|
.initialization_script(include_str!("../inject/index.js"));
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ mod util;
|
|||||||
use app::{invoke, menu, window};
|
use app::{invoke, menu, window};
|
||||||
use invoke::{download_file, drag_window, fullscreen, open_browser};
|
use invoke::{download_file, drag_window, fullscreen, open_browser};
|
||||||
use menu::{get_menu, menu_event_handle};
|
use menu::{get_menu, menu_event_handle};
|
||||||
use tauri_plugin_window_state::{Builder as windowStatePlugin, StateFlags, WindowExt};
|
use tauri_plugin_window_state::{Builder as windowStatePlugin};
|
||||||
use util::{get_data_dir, get_pake_config};
|
use util::{get_data_dir, get_pake_config};
|
||||||
use window::get_window;
|
use window::get_window;
|
||||||
|
|
||||||
@@ -50,8 +50,6 @@ pub fn run_app() {
|
|||||||
.setup(|app| {
|
.setup(|app| {
|
||||||
let _window = get_window(app, pake_config, data_dir);
|
let _window = get_window(app, pake_config, data_dir);
|
||||||
// Prevent initial shaking
|
// Prevent initial shaking
|
||||||
_window.restore_state(StateFlags::all()).unwrap();
|
|
||||||
_window.set_decorations(true).unwrap();
|
|
||||||
_window.show().unwrap();
|
_window.show().unwrap();
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"tauri": {
|
"tauri": {
|
||||||
"bundle": {
|
"bundle": {
|
||||||
"icon": ["icons/weread.icns"],
|
"icon": ["icons/weread.icns"],
|
||||||
"identifier": "com.tw93.weread",
|
"identifier": "com.tw93.weread1",
|
||||||
"active": true,
|
"active": true,
|
||||||
"category": "DeveloperTool",
|
"category": "DeveloperTool",
|
||||||
"copyright": "",
|
"copyright": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user