theme attachment approval keyboard

// FREEBIE
This commit is contained in:
Michael Kirk 2018-08-19 01:43:21 +02:00
parent 5907cd2a0d
commit b80d88c824
5 changed files with 9 additions and 2 deletions

View File

@ -530,6 +530,7 @@ class CaptioningToolbar: UIView, UITextViewDelegate {
self.backgroundColor = UIColor.clear
textView.delegate = self
textView.keyboardAppearance = Theme.keyboardAppearance
textView.backgroundColor = (Theme.isDarkThemeEnabled ? UIColor.ows_dark85 : UIColor.ows_light02)
textView.layer.borderColor = (Theme.isDarkThemeEnabled
? Theme.primaryColor.withAlphaComponent(0.06).cgColor

View File

@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)ows_applyTheme
{
self.keyboardAppearance = (Theme.isDarkThemeEnabled ? UIKeyboardAppearanceDark : UIKeyboardAppearanceDefault);
self.keyboardAppearance = Theme.keyboardAppearance;
}
- (BOOL)becomeFirstResponder

View File

@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)ows_applyTheme
{
self.keyboardAppearance = (Theme.isDarkThemeEnabled ? UIKeyboardAppearanceDark : UIKeyboardAppearanceDefault);
self.keyboardAppearance = Theme.keyboardAppearance;
}
@end

View File

@ -47,6 +47,7 @@ extern NSString *const ThemeDidChangeNotification;
#pragma mark -
@property (class, readonly, nonatomic) UIBlurEffect *barBlurEffect;
@property (class, readonly, nonatomic) UIKeyboardAppearance keyboardAppearance;
#pragma mark -

View File

@ -138,6 +138,11 @@ NSString *const ThemeKeyThemeEnabled = @"ThemeKeyThemeEnabled";
: [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
}
+ (UIKeyboardAppearance)keyboardAppearance
{
return Theme.isDarkThemeEnabled ? UIKeyboardAppearanceDark : UIKeyboardAppearanceDefault;
}
#pragma mark -
+ (UIColor *)toastForegroundColor