|
@@ -2,7 +2,7 @@
|
|
|
* UIBarButtonItem+Theme.m
|
|
|
* VLC for iOS
|
|
|
*****************************************************************************
|
|
|
- * Copyright (c) 2013-2015 VideoLAN. All rights reserved.
|
|
|
+ * Copyright (c) 2013-2017 VideoLAN. All rights reserved.
|
|
|
* $Id$
|
|
|
*
|
|
|
* Authors: Felix Paul Kühne <fkuehne # videolan.org>
|
|
@@ -16,7 +16,7 @@
|
|
|
+ (UIBarButtonItem *)themedBackButtonWithTarget:(id)target andSelector:(SEL)selector
|
|
|
{
|
|
|
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"BUTTON_BACK", nil)
|
|
|
- style:UIBarButtonItemStyleBordered
|
|
|
+ style:UIBarButtonItemStylePlain
|
|
|
target:target
|
|
|
action:selector];
|
|
|
backButton.tintColor = [UIColor whiteColor];
|
|
@@ -33,16 +33,15 @@
|
|
|
* Note: this icon doesn't represent an endorsement of The Coca-Cola Company
|
|
|
* and should not be confused with the idea of religious statements or propagation there off
|
|
|
*/
|
|
|
- NSCalendar *gregorian =
|
|
|
- [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
|
|
|
- NSUInteger dayOfYear = [gregorian ordinalityOfUnit:NSDayCalendarUnit inUnit:NSYearCalendarUnit forDate:[NSDate date]];
|
|
|
+ NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
|
|
|
+ NSUInteger dayOfYear = [gregorian ordinalityOfUnit:NSCalendarUnitDay inUnit:NSCalendarUnitYear forDate:[NSDate date]];
|
|
|
UIImage *icon;
|
|
|
if (dayOfYear >= 354)
|
|
|
icon = [UIImage imageNamed:@"vlc-xmas"];
|
|
|
else
|
|
|
icon = [UIImage imageNamed:@"menuCone"];
|
|
|
|
|
|
- UIBarButtonItem *menuButton = [[UIBarButtonItem alloc] initWithImage:icon style:UIBarButtonItemStyleBordered target:target action:selector];
|
|
|
+ UIBarButtonItem *menuButton = [[UIBarButtonItem alloc] initWithImage:icon style:UIBarButtonItemStylePlain target:target action:selector];
|
|
|
menuButton.tintColor = [UIColor whiteColor];
|
|
|
menuButton.accessibilityLabel = NSLocalizedString(@"OPEN_VLC_MENU", nil);
|
|
|
|
|
@@ -51,7 +50,7 @@
|
|
|
|
|
|
+ (UIBarButtonItem *)themedDarkToolbarButtonWithTitle:(NSString*)title target:(id)target andSelector:(SEL)selector
|
|
|
{
|
|
|
- UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithTitle:title style:UIBarButtonItemStyleBordered target:target action:selector];
|
|
|
+ UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithTitle:title style:UIBarButtonItemStylePlain target:target action:selector];
|
|
|
button.tintColor = [UIColor whiteColor];
|
|
|
|
|
|
return button;
|