fix: fix code review comments
This commit is contained in:
@@ -1,17 +1,8 @@
|
|||||||
use tauri_utils::config::{Config, WindowConfig};
|
use tauri_utils::config::{Config, WindowConfig};
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
use wry::{
|
use wry::application::platform::macos::WindowBuilderExtMacOS;
|
||||||
application::{
|
|
||||||
platform::macos::WindowBuilderExtMacOS,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
use wry::{
|
use wry::application::platform::windows::WindowBuilderExtWindows;
|
||||||
application::{
|
|
||||||
platform::windows::WindowBuilderExtWindows
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
fn main() -> wry::Result<()> {
|
fn main() -> wry::Result<()> {
|
||||||
use wry::{
|
use wry::{
|
||||||
@@ -68,29 +59,21 @@ fn main() -> wry::Result<()> {
|
|||||||
None
|
None
|
||||||
})
|
})
|
||||||
.with_inner_size(wry::application::dpi::LogicalSize::new(width, height));
|
.with_inner_size(wry::application::dpi::LogicalSize::new(width, height));
|
||||||
#[cfg(windows)]
|
|
||||||
let init_window = || {
|
|
||||||
let window = common_window
|
|
||||||
.with_decorations(false)
|
|
||||||
.with_title("")
|
|
||||||
.build(&event_loop)
|
|
||||||
.unwrap();
|
|
||||||
window
|
|
||||||
};
|
|
||||||
|
|
||||||
#[cfg(macos)]
|
#[cfg(target_os = "windows")]
|
||||||
let init_window = || {
|
let window = common_window
|
||||||
let window = common_window
|
.with_decorations(false)
|
||||||
.with_fullsize_content_view(true)
|
.with_title("")
|
||||||
.with_titlebar_buttons_hidden(false)
|
.build(&event_loop)
|
||||||
.with_title_hidden(true)
|
.unwrap();
|
||||||
.with_menu(menu_bar_menu)
|
#[cfg(target_os = "macos")]
|
||||||
.build(&event_loop)
|
let window = common_window
|
||||||
.unwrap();
|
.with_fullsize_content_view(true)
|
||||||
window
|
.with_titlebar_buttons_hidden(false)
|
||||||
};
|
.with_title_hidden(true)
|
||||||
|
.with_menu(menu_bar_menu)
|
||||||
let window = init_window();
|
.build(&event_loop)
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
let handler = move |window: &Window, req: String| {
|
let handler = move |window: &Window, req: String| {
|
||||||
if req == "drag_window" {
|
if req == "drag_window" {
|
||||||
|
|||||||
Reference in New Issue
Block a user