Commit c37f5796 authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

Dropbox: adapt table view appearance to match the library

parent 3635dbd4
......@@ -16,13 +16,6 @@
NSAssert([nibContentArray count] == 1, @"meh");
NSAssert([[nibContentArray lastObject] isKindOfClass:[VLCDropboxTableViewCell class]], @"meh meh");
VLCDropboxTableViewCell *cell = (VLCDropboxTableViewCell *)[nibContentArray lastObject];
CGRect frame = [cell frame];
UIView *background = [[UIView alloc] initWithFrame:frame];
background.backgroundColor = [UIColor colorWithWhite:.05 alpha:1.];
cell.backgroundView = background;
UIView *highlightedBackground = [[UIView alloc] initWithFrame:frame];
highlightedBackground.backgroundColor = [UIColor colorWithWhite:.2 alpha:1.];
cell.selectedBackgroundView = highlightedBackground;
return cell;
}
......
......@@ -65,7 +65,8 @@
self.navigationItem.titleView.contentMode = UIViewContentModeScaleAspectFit;
self.tableView.rowHeight = [VLCDropboxTableViewCell heightOfCell];
self.tableView.separatorColor = [UIColor colorWithWhite:.2 alpha:1.];
self.tableView.separatorColor = [UIColor colorWithWhite:.122 alpha:1.];
self.view.backgroundColor = [UIColor colorWithWhite:.122 alpha:1.];
_numberOfFilesBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:[NSString stringWithFormat:NSLocalizedString(@"NUM_OF_FILES", @""), 0] style:UIBarButtonItemStylePlain target:nil action:nil];
[_numberOfFilesBarButtonItem setTitleTextAttributes:@{ UITextAttributeFont : [UIFont systemFontOfSize:11.] } forState:UIControlStateNormal];
......@@ -160,6 +161,11 @@
#pragma mark - Table view delegate
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
cell.backgroundColor = (indexPath.row % 2 == 0)? [UIColor blackColor]: [UIColor colorWithWhite:.122 alpha:1.];
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
DBMetadata *selectedFile = _dropboxController.currentListFiles[indexPath.row];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment