fixed display of images

This commit is contained in:
PandaDEV 2024-08-27 15:38:01 +10:00
parent fb535a4521
commit fd4ce395f5
No known key found for this signature in database
GPG key ID: 13EFF9BAF70EE75C
5 changed files with 84 additions and 63 deletions

View file

@ -1,13 +1,12 @@
use tauri::{
menu::{MenuBuilder, MenuItemBuilder},
tray::{MouseButton, TrayIconBuilder, TrayIconEvent},
tray::TrayIconBuilder,
Manager,
};
pub fn setup(app: &mut tauri::App) -> Result<(), Box<dyn std::error::Error>> {
let window = app.get_webview_window("main").unwrap();
let window_clone_for_tray = window.clone();
let window_clone_for_click = window.clone();
let icon_bytes = include_bytes!("../../icons/Square71x71Logo.png");
let icon = tauri::image::Image::from_bytes(icon_bytes).unwrap();
@ -37,14 +36,6 @@ pub fn setup(app: &mut tauri::App) -> Result<(), Box<dyn std::error::Error>> {
}
_ => (),
})
// .on_tray_icon_event(move |_tray, event| {
// if let TrayIconEvent::Click { button, .. } = event {
// if button == MouseButton::Left {
// window_clone_for_click.show().unwrap();
// window_clone_for_click.set_focus().unwrap();
// }
// }
// })
.icon(icon)
.build(app)?;