chrisbanes / haze

A blurring modifier for Compose Multiplatform / Jetpack Compose
https://chrisbanes.github.io/haze/
Apache License 2.0
850 stars 25 forks source link

Dialog blur offset #200

Closed Stavrenas closed 2 weeks ago

Stavrenas commented 2 weeks ago

Information

Expected Behavior

Dialog is uniformly blurred

Screenshot_2024-04-29-13-36-48-091_ai datawise finstreet

This screenshot was generated by enabling the fullscreen mode (activity.window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_FULLSCREEN)

Actual Behavior

Dialog's blur is offset by the top (or bottom) bar when not in fullscreen

Screenshot_2024-04-29-13-38-47-935_ai datawise finstreet

Steps to Reproduce the Problem

  1. Create a new native android project
  2. Copy-paste the sample code for the dialog preview
  3. Launch the app on the device

Unfortunately, I can't compile the source code to do any debugging (yet).

chrisbanes commented 2 weeks ago

I'm afraid that I can't reproduce this at all. If you can provide a sample which reproduces on an emulator then I can take a look.

Stavrenas commented 2 weeks ago

@chrisbanes sure, can you try this repo? https://github.com/Stavrenas/haze-offset

Edit: Make sure to launch the previews on a real device. Haven't tried on an emulator

chrisbanes commented 2 weeks ago

I still can't recreate this an emulator or Pixel 8.

I'm afraid that if this isn't reproducible on an emulator then it's almost certain to be a OEM/device specific issue, and there's not much I can do to help here really. What device and Android version are you using?

FYI, the integration here is extremely simple: it's just a call to View.getLocationOnScreen.

Stavrenas commented 2 weeks ago

I'm on a Pixel 6 on an Ubuntu dev environment, however this happens also on a Windows machine with a Poco X4 GT device.

I tried the same thing on the emulator, Pixel 8 (default settings) and the result is the same. pixel_8_emulator

I'm starting to think, maybe it's jdk related? I'm on version 17, I'll try a newer one and update you

chrisbanes commented 2 weeks ago

So just to confirm, this only happens when deploying previews?