فهرست منبع

Update preset colors to be class properties

Samuel Giddins 6 سال پیش
والد
کامیت
c3faca38fd
3فایلهای تغییر یافته به همراه17 افزوده شده و 17 حذف شده
  1. 1 1
      Sources/MediaViewControllers/MediaViewController.swift
  2. 8 8
      Sources/UIColor+Presets.h
  3. 8 8
      Sources/UIColor+Presets.m

+ 1 - 1
Sources/MediaViewControllers/MediaViewController.swift

@@ -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)
     }

+ 8 - 8
Sources/UIColor+Presets.h

@@ -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

+ 8 - 8
Sources/UIColor+Presets.m

@@ -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];
 }