mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-20 16:01:18 +02:00
Fix traffic lights thingy
This commit is contained in:
@@ -352,7 +352,10 @@ fn main() {
|
|||||||
.system_tray(system_tray)
|
.system_tray(system_tray)
|
||||||
.setup(|app| {
|
.setup(|app| {
|
||||||
let win = app.get_window("main").unwrap();
|
let win = app.get_window("main").unwrap();
|
||||||
|
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
win.position_traffic_lights();
|
win.position_traffic_lights();
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
.setup(|app| {
|
.setup(|app| {
|
||||||
@@ -402,6 +405,8 @@ fn main() {
|
|||||||
.on_window_event(|e| {
|
.on_window_event(|e| {
|
||||||
let apply_offset = || {
|
let apply_offset = || {
|
||||||
let win = e.window();
|
let win = e.window();
|
||||||
|
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
win.position_traffic_lights();
|
win.position_traffic_lights();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ const TRAFFIC_LIGHT_OFFSET_X: f64 = 15.0;
|
|||||||
const TRAFFIC_LIGHT_OFFSET_Y: f64 = 22.0;
|
const TRAFFIC_LIGHT_OFFSET_Y: f64 = 22.0;
|
||||||
|
|
||||||
pub trait WindowExt {
|
pub trait WindowExt {
|
||||||
#[cfg(target_os = "macos")]
|
|
||||||
fn position_traffic_lights(&self);
|
fn position_traffic_lights(&self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user