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

[iOS] Add Platform Specific option to not adjust the status bar text color based on the luminosity of the NavigationBar text color #517

Merged
merged 6 commits into from Nov 16, 2016

Conversation

Projects
None yet
5 participants
@samhouts
Member

samhouts commented Nov 9, 2016

Description of Change

[iOS] Add Platform Specific option to not adjust the status bar text color based on the luminosity of the NavigationBar text color.

Bugs Fixed

Please note that this PR provides an opt-in override for the behavior described in the following bug reports. Users must call NavigationBar.SetStatusBarTextColorMode(StatusBarTextColorMode.DoNotAdjust) to override the automatic text color adjustment.

API Changes

List all API changes here (or just put None), example:

Added:

  • NavigationBar.On<iOS>().GetStatusBarTextColorMode()
  • NavigationBar.On<iOS>().SetStatusBarTextColorMode()
  • enum StatusBarTextColorMode

Behavioral Changes

None

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense

@dnfclas dnfclas added the cla-required label Nov 9, 2016

public enum StatusBarTextColorMode
{
MatchNavigationBarTextLuminosity,
DoNotAdjust

This comment has been minimized.

@samhouts

samhouts Nov 9, 2016

Member

I'm not particularly happy with this naming. I want it to be Default, but the Forms "default" is to adjust the text color. If anyone has a better name, please feel free to suggest it.

@samhouts

samhouts Nov 9, 2016

Member

I'm not particularly happy with this naming. I want it to be Default, but the Forms "default" is to adjust the text color. If anyone has a better name, please feel free to suggest it.

This comment has been minimized.

@pauldipietro

pauldipietro Nov 9, 2016

Member

Unmodified / unadjusted?

@pauldipietro

pauldipietro Nov 9, 2016

Member

Unmodified / unadjusted?

? UINavigationBar.Appearance.TintColor
: barTextColor.ToUIColor();
}
if (barTextColor.Luminosity > 0.5)
if (statusBarColorMode == StatusBarTextColorMode.DoNotAdjust || barTextColor.Luminosity <= 0.5)

This comment has been minimized.

@samhouts

samhouts Nov 9, 2016

Member

swapped the if/else to add the additional statement

@samhouts

samhouts Nov 9, 2016

Member

swapped the if/else to add the additional statement

@StephaneDelcroix

👍 when you're happy with the naming.

and do not think the #region directive you tried to sneak in went unnoticed!

@jassmith

This comment has been minimized.

Show comment
Hide comment
@jassmith

jassmith Nov 16, 2016

Member

👍

Member

jassmith commented Nov 16, 2016

👍

samhouts added some commits Nov 8, 2016

@samhouts samhouts merged commit 20adf7e into master Nov 16, 2016

@samhouts samhouts deleted the fix-bugzilla44777 branch Nov 16, 2016

@samhouts samhouts added this to the 2.3.4 milestone Jun 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment