Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set_traffic_lights_inset was Reset during zoom #33

Open
cyz1901 opened this issue Nov 17, 2024 · 3 comments
Open

set_traffic_lights_inset was Reset during zoom #33

cyz1901 opened this issue Nov 17, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@cyz1901
Copy link

cyz1901 commented Nov 17, 2024

I have a mac app and have code in setup

 #[cfg(target_os = "macos")] {
        // Set a custom inset to the traffic lights
        window.set_traffic_lights_inset(12.0, 18.0).unwrap();

        // Make window transparent without privateApi
        window.make_transparent().unwrap();
      }

also add set_traffic_lights_inset in on_window_event

  .on_window_event(|window, event| {
      match event {
          WindowEvent::Resized(_) => {
              #[cfg(target_os = "macos")]
              {
                let webview_window = window.get_webview_window("main").unwrap();
                webview_window.set_traffic_lights_inset(12.0, 18.0).unwrap();
              }
          }
          _ => {
          }
      }
  })

I've noticed that when I double-click the toolbar, set_traffic_lights_inset only works when the zooming behavior starts and ends. I'm curious how to keep traffic_lights in the correct position during zooming.

Currently during zooming, traffic_lights are reset to the position when set_traffic_lights_inset is not set.

@clearlysid
Copy link
Owner

Ah, good catch! This is definitely something we should fix. I will try to push a fix for this in december once I'm back from my break.

@clearlysid clearlysid added the bug Something isn't working label Nov 23, 2024
@arjOman

This comment has been minimized.

@nooblyf
Copy link

nooblyf commented Dec 8, 2024

+1 That's Necessary

@arjOman send a patch then? comments like these are useless

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants