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

Dark statusbar on dark background #17

Closed
rozPierog opened this issue Oct 13, 2021 · 6 comments · Fixed by #21
Closed

Dark statusbar on dark background #17

rozPierog opened this issue Oct 13, 2021 · 6 comments · Fixed by #21
Labels
bug Something isn't working good first issue Good for newcomers hacktoberfest

Comments

@rozPierog
Copy link
Owner

rozPierog commented Oct 13, 2021

Screenshot_20211013-204717_Cofi.jpg

@rozPierog rozPierog added bug Something isn't working good first issue Good for newcomers hacktoberfest labels Oct 13, 2021
@AdiAr11
Copy link

AdiAr11 commented Oct 14, 2021

hi, what needs to be changed here? Can i help?

@rozPierog
Copy link
Owner Author

Hi @AdiAr11 sure you can!
Problem is that we don't know what color is behind status bar (because of Material You/Monet) so we can't set statusbar color accordingly.
There is luminance() prop in Color that could tell us how bright that color is in 0.0f-1.0f
eg.

MaterialTheme.colors.surface.luminance() > 0.5f

and based on that we can set status bar icons color using

WindowInsetsControllerCompat.isAppearanceLightStatusBars = !isColorBright

If you decide to work on it, create a Draft PR so I can answer your questions there

@AdiAr11
Copy link

AdiAr11 commented Oct 14, 2021

thank you. i'll try it and get back to you.

@iamyajat
Copy link
Contributor

Hey @rozPierog, can I work on this?

@rozPierog
Copy link
Owner Author

@iamyajat I see no reason not to. Unless @AdiAr11 is working on it in secret then it would be shame to double the work

@AdiAr11
Copy link

AdiAr11 commented Oct 21, 2021

@rozPierog I'm really very sorry to keep you waiting,I got a little busy. I'll create a draft pr. @iamyajat please feel free to continue with this issue, It might take longer for me to complete. Again really sorry !!

@rozPierog rozPierog linked a pull request Oct 21, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants