mirror of
https://github.com/SECTL/SecScore.git
synced 2026-07-19 19:04:23 +08:00
调整横竖切换为图标按钮并锁定竖屏尺寸
This commit is contained in:
@@ -87,3 +87,15 @@ pub async fn window_resize(
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn window_set_resizable(
|
||||
resizable: bool,
|
||||
app: AppHandle,
|
||||
_state: tauri::State<'_, Arc<RwLock<AppState>>>,
|
||||
) -> Result<(), String> {
|
||||
if let Some(window) = app.get_webview_window("main") {
|
||||
window.set_resizable(resizable).map_err(|e| e.to_string())?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -71,6 +71,7 @@ fn main() {
|
||||
window_is_maximized,
|
||||
toggle_devtools,
|
||||
window_resize,
|
||||
window_set_resizable,
|
||||
db_test_connection,
|
||||
db_switch_connection,
|
||||
db_get_status,
|
||||
|
||||
Reference in New Issue
Block a user