Skip to content
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

Feature: Enable search in grid/wall view #519

Merged
merged 17 commits into from
Jan 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 24 additions & 12 deletions XBMC Remote/BDKCollectionIndexView/BDKCollectionIndexView.m
Original file line number Diff line number Diff line change
Expand Up @@ -166,20 +166,32 @@ - (void)buildIndexLabels {

NSMutableArray *workingLabels = [NSMutableArray arrayWithCapacity:self.indexTitles.count];
for (NSString *indexTitle in self.indexTitles) {
if (![indexTitle isEqualToString:@"🔍"]) {
UILabel *label = [[UILabel alloc] initWithFrame:CGRectZero];
label.text = indexTitle;
label.font = [UIFont boldSystemFontOfSize:11];
label.minimumScaleFactor = 11.0/11.0;
label.adjustsFontSizeToFitWidth = YES;
label.backgroundColor = UIColor.clearColor;
UILabel *label = [[UILabel alloc] initWithFrame:CGRectZero];
label.text = indexTitle;
label.font = [UIFont boldSystemFontOfSize:11];
label.minimumScaleFactor = 11.0/11.0;
label.adjustsFontSizeToFitWidth = YES;
if ([indexTitle isEqualToString:@"🔍"]) {
// Use the same icon as iOS's index (magnifying glass with transparent circle)
wutschel marked this conversation as resolved.
Show resolved Hide resolved
UIImage *searchImage = [UIImage imageNamed:@"icon_search"];
searchImage = [Utilities colorizeImage:searchImage withColor:UIColor.systemBlueColor];
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, 11)];
imageView.contentMode = UIViewContentModeScaleAspectFit;
imageView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin;
imageView.image = searchImage;

[label addSubview:imageView];
label.textColor = UIColor.clearColor;
}
else {
label.textColor = UIColor.systemBlueColor;
label.shadowColor = UIColor.clearColor;
label.shadowOffset = CGSizeMake(0, 1);
label.textAlignment = NSTextAlignmentCenter;
[self addSubview:label];
[workingLabels addObject:label];
}
label.backgroundColor = UIColor.clearColor;
label.shadowColor = UIColor.clearColor;
label.shadowOffset = CGSizeMake(0, 1);
label.textAlignment = NSTextAlignmentCenter;
[self addSubview:label];
[workingLabels addObject:label];
}
self.indexLabels = [NSArray arrayWithArray:workingLabels];
}
Expand Down
1 change: 0 additions & 1 deletion XBMC Remote/DetailViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
CGFloat iOSYDelta;
__weak IBOutlet UIToolbar *buttonsViewBgToolbar;
BOOL isViewDidLoad;
BOOL hideSearchBarActive;
BOOL forceMusicAlbumMode;
NSMutableDictionary *epgDict;
NSMutableArray *epgDownloadQueue;
Expand Down
Loading