forked from Berry-Dash/launcher
Fix a weird issue on windows with enabling/disabling rounding
This commit is contained in:
@@ -10,7 +10,7 @@ use std::{
|
|||||||
time::Duration,
|
time::Duration,
|
||||||
};
|
};
|
||||||
use sysinfo::System;
|
use sysinfo::System;
|
||||||
use tauri::{AppHandle, Emitter, Manager};
|
use tauri::{AppHandle, Emitter, Manager, PhysicalSize};
|
||||||
use tauri_plugin_dialog::{DialogExt, MessageDialogKind};
|
use tauri_plugin_dialog::{DialogExt, MessageDialogKind};
|
||||||
use tauri_plugin_opener::OpenerExt;
|
use tauri_plugin_opener::OpenerExt;
|
||||||
use tauri_plugin_os::platform;
|
use tauri_plugin_os::platform;
|
||||||
@@ -381,7 +381,12 @@ fn fix_mac_permissions(app: AppHandle, name: String, executable: String) {
|
|||||||
|
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
fn windows_rounded_corners(app: AppHandle, enabled: bool) {
|
fn windows_rounded_corners(app: AppHandle, enabled: bool) {
|
||||||
let _ = app.get_webview_window("main").unwrap().set_shadow(enabled);
|
let window = app.get_webview_window("main");
|
||||||
|
let _ = window.clone().unwrap().set_shadow(enabled);
|
||||||
|
let _ = window
|
||||||
|
.clone()
|
||||||
|
.unwrap()
|
||||||
|
.set_size(PhysicalSize::new(1000.0, 632.0)); // Yes, this is needed.
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||||
|
|||||||
Reference in New Issue
Block a user