Commit c3faca38 authored by Samuel Giddins's avatar Samuel Giddins Committed by Carola Nitz

Update preset colors to be class properties

parent 72f2fd73
......@@ -77,7 +77,7 @@ class VLCMediaViewController: VLCPagingViewController<VLCLabelCell> {
sortOptionsAlertController.addAction(sortbyDateAction)
sortOptionsAlertController.addAction(sortBySizeAction)
sortOptionsAlertController.addAction(cancelAction)
sortOptionsAlertController.view.tintColor = UIColor.vlcOrangeTint()
sortOptionsAlertController.view.tintColor = .vlcOrangeTint
sortOptionsAlertController.popoverPresentationController?.sourceView = self.view
present(sortOptionsAlertController, animated: true)
}
......
......@@ -14,13 +14,13 @@
@interface UIColor (Presets)
+ (UIColor *)VLCDarkBackgroundColor;
+ (UIColor *)VLCTransparentDarkBackgroundColor;
+ (UIColor *)VLCLightTextColor;
+ (UIColor *)VLCDarkFadedTextColor;
+ (UIColor *)VLCDarkTextColor;
+ (UIColor *)VLCDarkTextShadowColor;
+ (UIColor *)VLCOrangeTintColor;
+ (UIColor *)VLCMenuBackgroundColor;
@property (nonatomic, strong, readonly, nonnull, class) UIColor *VLCDarkBackgroundColor;
@property (nonatomic, strong, readonly, nonnull, class) UIColor *VLCTransparentDarkBackgroundColor;
@property (nonatomic, strong, readonly, nonnull, class) UIColor *VLCLightTextColor;
@property (nonatomic, strong, readonly, nonnull, class) UIColor *VLCDarkFadedTextColor;
@property (nonatomic, strong, readonly, nonnull, class) UIColor *VLCDarkTextColor;
@property (nonatomic, strong, readonly, nonnull, class) UIColor *VLCDarkTextShadowColor;
@property (nonatomic, strong, readonly, nonnull, class) UIColor *VLCOrangeTintColor;
@property (nonatomic, strong, readonly, nonnull, class) UIColor *VLCMenuBackgroundColor;
@end
......@@ -14,41 +14,41 @@
@implementation UIColor (Presets)
+ (UIColor *)VLCDarkBackgroundColor
+ (nonnull UIColor *)VLCDarkBackgroundColor
{
return [UIColor colorWithWhite:.122 alpha:1.];
}
+ (UIColor *)VLCTransparentDarkBackgroundColor
+ (nonnull UIColor *)VLCTransparentDarkBackgroundColor
{
return [UIColor colorWithWhite:.122 alpha:0.75];
}
+ (UIColor *)VLCLightTextColor
+ (nonnull UIColor *)VLCLightTextColor
{
return [UIColor colorWithWhite:.72 alpha:1.];
}
+ (UIColor *)VLCDarkFadedTextColor {
+ (nonnull UIColor *)VLCDarkFadedTextColor {
return [UIColor colorWithRed:0.33 green:0.33 blue:0.33 alpha:1.0];
}
+ (UIColor *)VLCDarkTextColor
+ (nonnull UIColor *)VLCDarkTextColor
{
return [UIColor colorWithWhite:.28 alpha:1.];
}
+ (UIColor *)VLCDarkTextShadowColor
+ (nonnull UIColor *)VLCDarkTextShadowColor
{
return [UIColor colorWithWhite:0. alpha:.25f];
}
+ (UIColor *)VLCMenuBackgroundColor
+ (nonnull UIColor *)VLCMenuBackgroundColor
{
return [UIColor colorWithWhite:.17f alpha:1.];
}
+ (UIColor *)VLCOrangeTintColor
+ (nonnull UIColor *)VLCOrangeTintColor
{
return [UIColor colorWithRed:1.0f green:(132.0f/255.0f) blue:0.0f alpha:1.f];
}
......
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