refactor layout, support windows and linux

This commit is contained in:
Ren Amamiya
2023-06-22 12:26:48 +07:00
parent 7b09dc3147
commit 699a26b3f0
14 changed files with 50 additions and 80 deletions

View File

@@ -28,7 +28,7 @@ fn main() {
let main_window = app.get_window("main").unwrap();
#[cfg(target_os = "macos")]
main_window.position_traffic_lights(8.0, 16.0); // set inset for traffic lights (macos)
main_window.position_traffic_lights(13.0, 17.0); // set inset for traffic lights (macos)
Ok(())
})
@@ -37,7 +37,7 @@ fn main() {
let apply_offset = || {
let win = e.window();
// keep inset for traffic lights when window resize (macos)
win.position_traffic_lights(8.0, 16.0);
win.position_traffic_lights(13.0, 17.0);
};
#[cfg(target_os = "macos")]
match e.event() {