-
Notifications
You must be signed in to change notification settings - Fork 68
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
Fix status bar color #1615
Fix status bar color #1615
Conversation
Dang, sad to hear this didn't work - I also tried a few ideas but they didn't seem to work out either (e.g., using I did a quick test on it, and I noticed that there is still an issue when the colour scheme is set to pure black - in this case, the entire status bar turns white. I think we just need to add a conditional to check for that case, otherwise, everything else looks good to me! |
Thanks for trying anyway!
Ah good catch! Just pushed a fix for that. I tested with pure black and also system + pure black. |
I decided to pivot and take a new approach here. In addition to all the funky conditional logic, it seems like manually setting the color status bar has some unintended side-effects. So far the main problem seems to be with modals (other overlays created by us, as well as system overlays like dialogs, seem to properly dim the status bar), but that's enough for me to be a little wary of this solution. Instead I decided to remove the styling and allow the feed page to extend under the status bar ( As a bonus, I was able to restore I re-tested in light, dark, pure back, and system + pure black, but I'd appreciate any other testing, especially on the iOS side! |
Looks good to me! Nice catch with the modals 😄 - I'll merge this in and let you know if I notice any issues on the iOS side of things! |
This PR fixes an issue with the OS status bar area (on Android) when the AppBar not set to be pinned. See this comment for context.
It turns out that I just had to set the status bar color to
theme.colorScheme.surface
, which is the same as the the default color of theSliverAppBar
now. (Note that this is a slight difference compared to before the color updates. Previously, the AppBar was always solid white (or black, based on the theme), but now it always has a slight tint. I don't mind this tint, but I just had to update the status bar to match.) I did have to do little funkiness since we're technically "before" we know if we're in light or dark mode. But it seems to work fine!Oh and the reason this wasn't a problem when the top bar was pinned was because in that mode, we set the
SafeArea
to extend to the status bar area, so it was essentially tranasparent, and picking up the color of the AppBar.As I had mentioned in this comment, I did have to roll back the static
FlexColorScheme
for setting theSystemUiOverlayStyle
, because it only lets you set the nav bar, not the status bar. But if you have any ideas for a way around this, please let me know!Old Version (prior to color upgrades)
qemu-system-x86_64_ssWFRD1CGN.mp4
New Version Before
qemu-system-x86_64_uA6xyS09PS.mp4
New Version After
qemu-system-x86_64_hPkdvXDLAq.mp4