Skip to content

Commit

Permalink
refactor: fix tray_icon properties
Browse files Browse the repository at this point in the history
  • Loading branch information
decipher3114 committed Dec 23, 2024
1 parent 0194a05 commit c1cfa14
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ serde = { version = "1.0", features = ["derive"] }
tiny-skia = "0.11"
tokio = "1.40"
toml = "0.8"
tray-icon = "0.18"
xcap = "0.1"
tray-icon = "0.19"
xcap = "0.2"

[target.'cfg( target_os = "linux" )'.dependencies]
gtk = "0.18"
Expand Down
4 changes: 1 addition & 3 deletions src/tray_icon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ pub fn create_tray_icon() -> TrayIcon {
.with_icon(icon)
.with_menu(Box::new(menu))
.with_title(APPNAME)
.with_tooltip(format!("{} {}", APPNAME, env!("CARGO_PKG_VERSION")))
.build()
.unwrap()
}
Expand All @@ -76,9 +77,6 @@ pub fn tray_icon_listener() -> impl Stream<Item = AppEvent> {
loop {
if let Some(event) = reciever.recv().await {
match event {
TrayIconEvent::Click { button: Left, .. } => {
output.send(AppEvent::OpenConfigureWindow).await.unwrap()
}
TrayIconEvent::DoubleClick { button: Left, .. } => {
output.send(AppEvent::OpenCaptureWindow).await.unwrap()
}
Expand Down

0 comments on commit c1cfa14

Please sign in to comment.