Update LowContrastMode.xm

This commit is contained in:
aricloverGitHub (INACTIVE) 2025-08-23 12:10:14 -05:00 committed by GitHub
parent 6aa7661dc3
commit fff8d429c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -527,7 +527,7 @@ static inline BOOL customContrastMode() {
%hook NSAttributedString
- (instancetype)initWithString:(NSString *)str attributes:(NSDictionary<NSAttributedStringKey, id> *)attrs {
if (UIScreen.mainScreen.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
MutableDictionary *modifiedAttributes = [NSMutableDictionary dictionaryWithDictionary:attrs];
NSMutableDictionary *modifiedAttributes = [NSMutableDictionary dictionaryWithDictionary:attrs];
modifiedAttributes[NSForegroundColorAttributeName] = kDefaultTextColor;
return %orig(str, modifiedAttributes);
}