From 73a3d1850b83201c8dd4c4205a2731a077d63d79 Mon Sep 17 00:00:00 2001 From: Yannik Bloscheck Date: Sat, 12 Jul 2025 01:11:00 +0200 Subject: [PATCH] [ios] Always create light mode categories icons for the system search Signed-off-by: Yannik Bloscheck --- iphone/Maps/Core/Search/MWMSearch+CoreSpotlight.mm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/iphone/Maps/Core/Search/MWMSearch+CoreSpotlight.mm b/iphone/Maps/Core/Search/MWMSearch+CoreSpotlight.mm index 261237fb1..a3462dfa2 100644 --- a/iphone/Maps/Core/Search/MWMSearch+CoreSpotlight.mm +++ b/iphone/Maps/Core/Search/MWMSearch+CoreSpotlight.mm @@ -44,11 +44,12 @@ NSString * categoryKeyString = @(categoryKey.c_str()); NSString * imageName = [NSString stringWithFormat:@"Search/Categories/%@", [categoryKeyString stringByReplacingOccurrencesOfString: @"category_" withString:@""]]; + UIImage * image = [UIImage imageNamed:imageName inBundle:nil compatibleWithTraitCollection:[UITraitCollection traitCollectionWithUserInterfaceStyle: UIUserInterfaceStyleLight]]; UIGraphicsBeginImageContext(CGSizeMake(360, 360)); - [[UIImage imageNamed:imageName] drawInRect:CGRectMake(0, 0, 360, 360)]; - UIImage * image = UIGraphicsGetImageFromCurrentImageContext(); + [image drawInRect:CGRectMake(0, 0, 360, 360)]; + UIImage * resizedImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext() ; - attrSet.thumbnailData = UIImagePNGRepresentation(image); + attrSet.thumbnailData = UIImagePNGRepresentation(resizedImage); CSSearchableItem * item = [[CSSearchableItem alloc] initWithUniqueIdentifier:categoryKeyString