|
@@ -6,6 +6,7 @@
|
|
|
* $Id$
|
|
|
*
|
|
|
* Authors: Felix Paul Kühne <fkuehne # videolan dot org>
|
|
|
+ * Sylver Bruneau <sylver.bruneau # gmail dot com>
|
|
|
*
|
|
|
* Refer to the COPYING file of the official project for license.
|
|
|
*****************************************************************************/
|
|
@@ -13,6 +14,7 @@
|
|
|
#import "VLCEqualizerView.h"
|
|
|
#import "VLCTrackSelectorTableViewCell.h"
|
|
|
#import "VLCTrackSelectorHeaderView.h"
|
|
|
+#import "UIDevice+VLC.h"
|
|
|
|
|
|
#define PROFILE_SELECTOR_TABLEVIEW_SECTIONHEADER @"profile selector table section header"
|
|
|
#define PROFILE_SELECTOR_TABLEVIEW_CELL @"profile selector table view cell"
|
|
@@ -70,7 +72,7 @@
|
|
|
|
|
|
// Info
|
|
|
textView = [[UITextView alloc] initWithFrame:CGRectMake(sliderWidth, vertical_padding_up - 10, 55, 20)];
|
|
|
- textView.text = NSLocalizedString(@"20DB", nil);
|
|
|
+ textView.text = [NSString stringWithFormat:NSLocalizedString(@"DB_FORMAT", nil), 20];
|
|
|
textView.textAlignment = NSTextAlignmentRight;
|
|
|
textView.backgroundColor = [UIColor clearColor];
|
|
|
textView.textColor = [UIColor whiteColor];
|
|
@@ -78,7 +80,7 @@
|
|
|
[self addSubview:textView];
|
|
|
|
|
|
textView = [[UITextView alloc] initWithFrame:CGRectMake(sliderWidth, vertical_padding_up + sliderHeight / 2 - 15, 55, 20)];
|
|
|
- textView.text = NSLocalizedString(@"0DB", nil);
|
|
|
+ textView.text = [NSString stringWithFormat:NSLocalizedString(@"DB_FORMAT", nil), 0];
|
|
|
textView.textAlignment = NSTextAlignmentRight;
|
|
|
textView.backgroundColor = [UIColor clearColor];
|
|
|
textView.textColor = [UIColor whiteColor];
|
|
@@ -86,7 +88,7 @@
|
|
|
[self addSubview:textView];
|
|
|
|
|
|
textView = [[UITextView alloc] initWithFrame:CGRectMake(sliderWidth, frame.size.height - vertical_padding_down - 20, 55, 20)];
|
|
|
- textView.text = NSLocalizedString(@"-20DB", nil);
|
|
|
+ textView.text = [NSString stringWithFormat:NSLocalizedString(@"DB_FORMAT", nil), -20];
|
|
|
textView.textAlignment = NSTextAlignmentRight;
|
|
|
textView.backgroundColor = [UIColor clearColor];
|
|
|
textView.textColor = [UIColor whiteColor];
|
|
@@ -245,11 +247,20 @@
|
|
|
[self addSubview:textView];
|
|
|
|
|
|
// TableView
|
|
|
- self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0,frame.size.height - vertical_padding_down + 25,frame.size.width,145)
|
|
|
- style:UITableViewStyleGrouped];
|
|
|
- self.tableView.delegate = self;
|
|
|
- self.tableView.dataSource = self;
|
|
|
- [self addSubview:self.tableView];
|
|
|
+ _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0,frame.size.height - vertical_padding_down + 25.,frame.size.width,145.)
|
|
|
+ style:UITableViewStylePlain];
|
|
|
+ _tableView.delegate = self;
|
|
|
+ _tableView.dataSource = self;
|
|
|
+ _tableView.separatorColor = [UIColor clearColor];
|
|
|
+ _tableView.indicatorStyle = UIScrollViewIndicatorStyleWhite;
|
|
|
+ [_tableView registerClass:[VLCTrackSelectorHeaderView class] forHeaderFooterViewReuseIdentifier:PROFILE_SELECTOR_TABLEVIEW_SECTIONHEADER];
|
|
|
+ [_tableView registerClass:[VLCTrackSelectorTableViewCell class] forCellReuseIdentifier:PROFILE_SELECTOR_TABLEVIEW_CELL];
|
|
|
+ if ([[UIDevice currentDevice] speedCategory] >= 3) {
|
|
|
+ _tableView.opaque = NO;
|
|
|
+ _tableView.backgroundColor = [UIColor clearColor];
|
|
|
+ } else
|
|
|
+ _tableView.backgroundColor = [UIColor blackColor];
|
|
|
+ [self addSubview:_tableView];
|
|
|
return self;
|
|
|
}
|
|
|
|