mirror of
https://github.com/0PandaDEV/Qopy.git
synced 2025-04-22 05:34:04 +02:00
fixed display of images
This commit is contained in:
parent
fb535a4521
commit
fd4ce395f5
5 changed files with 84 additions and 63 deletions
|
@ -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)?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue