Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
cauyxy committed Sep 12, 2023
1 parent 9e033cd commit 6c400d0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions plugins/positioner/src/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ impl<R: Runtime> WindowExt for Window<R> {
},
#[cfg(feature = "system-tray")]
TrayLeft => {
if let (Some((tray_x, tray_y)), Some((_, tray_height))) = (tray_position, tray_size)
if let (Some((tray_x, tray_y)), Some((_, _tray_height))) = (tray_position, tray_size)
{
let y = tray_y - window_size.height;
// Choose y value based on the target OS
#[cfg(target_os = "windows")]
let y = if y < 0 { tray_y + tray_height } else { y };
let y = if y < 0 { tray_y + _tray_height } else { y };

#[cfg(target_os = "macos")]
let y = if y < 0 { tray_y } else { y };
Expand All @@ -135,13 +135,13 @@ impl<R: Runtime> WindowExt for Window<R> {
}
#[cfg(feature = "system-tray")]
TrayRight => {
if let (Some((tray_x, tray_y)), Some((tray_width, tray_height))) =
if let (Some((tray_x, tray_y)), Some((tray_width, _tray_height))) =
(tray_position, tray_size)
{
let y = tray_y - window_size.height;
// Choose y value based on the target OS
#[cfg(target_os = "windows")]
let y = if y < 0 { tray_y + tray_height } else { y };
let y = if y < 0 { tray_y + _tray_height } else { y };

#[cfg(target_os = "macos")]
let y = if y < 0 { tray_y } else { y };
Expand All @@ -168,14 +168,14 @@ impl<R: Runtime> WindowExt for Window<R> {
}
#[cfg(feature = "system-tray")]
TrayCenter => {
if let (Some((tray_x, tray_y)), Some((tray_width, tray_height))) =
if let (Some((tray_x, tray_y)), Some((tray_width, _tray_height))) =
(tray_position, tray_size)
{
let x = tray_x + tray_width / 2 - window_size.width / 2;
let y = tray_y - window_size.height;
// Choose y value based on the target OS
#[cfg(target_os = "windows")]
let y = if y < 0 { tray_y + tray_height } else { y };
let y = if y < 0 { tray_y + _tray_height } else { y };

#[cfg(target_os = "macos")]
let y = if y < 0 { tray_y } else { y };
Expand Down

0 comments on commit 6c400d0

Please sign in to comment.