Commit 903c1bc4 authored by Felix Paul Kühne's avatar Felix Paul Kühne

menu: draw speed optimizations

parent bee8fcfc
......@@ -19,5 +19,6 @@
+ (UIColor *)VLCLightTextColor;
+ (UIColor *)VLCDarkTextShadowColor;
+ (UIColor *)VLCOrangeTintColor;
+ (UIColor *)VLCMenuBackgroundColor;
@end
......@@ -34,6 +34,11 @@
return [UIColor colorWithWhite:0. alpha:.25f];
}
+ (UIColor *)VLCMenuBackgroundColor
{
return [UIColor colorWithWhite:.17f alpha:1.];
}
+ (UIColor *)VLCOrangeTintColor
{
return [UIColor colorWithRed:1.0f green:(132.0f/255.0f) blue:0.0f alpha:1.f];
......
......@@ -96,7 +96,7 @@ static NSString *WiFiCellIdentifier = @"VLCMenuWiFiCell";
style:UITableViewStylePlain];
_menuTableView.delegate = self;
_menuTableView.dataSource = self;
_menuTableView.backgroundColor = [UIColor clearColor];
_menuTableView.backgroundColor = [UIColor VLCMenuBackgroundColor];
_menuTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_menuTableView.indicatorStyle = UIScrollViewIndicatorStyleWhite;
_menuTableView.rowHeight = rowHeight;
......@@ -223,12 +223,13 @@ static NSString *WiFiCellIdentifier = @"VLCMenuWiFiCell";
UIView *headerView = nil;
if (headerText) {
headerView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, [UIScreen mainScreen].bounds.size.height, HEADER_HEIGHT)];
headerView.backgroundColor = [UIColor VLCMenuBackgroundColor];
UILabel *textLabel = [UILabel new];
textLabel.text = headerText;
textLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:[UIFont systemFontSize]];
textLabel.textColor = [UIColor whiteColor];
textLabel.backgroundColor = [UIColor clearColor];
textLabel.backgroundColor = [UIColor VLCMenuBackgroundColor];
[textLabel sizeToFit];
textLabel.translatesAutoresizingMaskIntoConstraints = NO;
[headerView addSubview:textLabel];
......
......@@ -68,7 +68,7 @@
- (void)setContentViewController:(UIViewController *)contentViewController
{
contentViewController.view.backgroundColor = [UIColor VLCDarkBackgroundColor];
contentViewController.view.backgroundColor = [UIColor VLCMenuBackgroundColor];
_sideMenuViewController.contentViewController = contentViewController;
}
......
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