From fdbb5edf553b0e004f366b2fa66d8ab501227ece Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Wed, 1 May 2019 10:45:04 -0600 Subject: [PATCH] Fix wrong tint in media views with light theme enabled --- SignalMessaging/utils/UIUtil.m | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/SignalMessaging/utils/UIUtil.m b/SignalMessaging/utils/UIUtil.m index 464cd83d35..cbe8377aa9 100644 --- a/SignalMessaging/utils/UIUtil.m +++ b/SignalMessaging/utils/UIUtil.m @@ -1,5 +1,5 @@ // -// Copyright (c) 2018 Open Whisper Systems. All rights reserved. +// Copyright (c) 2019 Open Whisper Systems. All rights reserved. // #import "UIUtil.h" @@ -32,7 +32,14 @@ UIToolbar.appearance.barTintColor = Theme.navbarBackgroundColor; UIToolbar.appearance.tintColor = Theme.navbarIconColor; - UIBarButtonItem.appearance.tintColor = Theme.navbarIconColor; + // We do _not_ specifiy BarButton.appearance.tintColor because it is sufficient to specify + // UINavigationBar.appearance.tintColor. Furthermore, specifying the BarButtonItem's + // apearence makes it more difficult to override the navbar theme, e.g. how we _always_ + // use dark theme in the media send flow and gallery views. If we were specifying + // barButton.appearence.tintColor we would then have to manually override each BarButtonItem's + // tint, rather than just the navbars. + // + // UIBarButtonItem.appearance.tintColor = Theme.navbarIconColor; // Using the keyboardAppearance causes crashes due to a bug in UIKit. // UITextField.appearance.keyboardAppearance = (Theme.isDarkThemeEnabled