|
@@ -27,12 +27,21 @@ import Foundation
|
|
|
|
|
|
class CreateMenuAdd: NSObject {
|
|
|
|
|
|
+ let appDelegate = UIApplication.shared.delegate as! AppDelegate
|
|
|
+
|
|
|
let fontButton = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 16)!, NSForegroundColorAttributeName: UIColor(colorLiteralRed: 65.0/255.0, green: 64.0/255.0, blue: 66.0/255.0, alpha: 1.0)]
|
|
|
let fontEncrypted = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 16)!, NSForegroundColorAttributeName: NCBrandColor.sharedInstance.cryptocloud] as [String : Any]
|
|
|
let fontCancel = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 16)!, NSForegroundColorAttributeName: NCBrandColor.sharedInstance.navigationBar] as [String : Any]
|
|
|
let fontDisable = [NSFontAttributeName:UIFont(name: "HelveticaNeue", size: 16)!, NSForegroundColorAttributeName: UIColor(colorLiteralRed: 65.0/255.0, green: 64.0/255.0, blue: 66.0/255.0, alpha: 1.0)]
|
|
|
|
|
|
let colorLightGray = UIColor(colorLiteralRed: 250.0/255.0, green: 250.0/255.0, blue: 250.0/255.0, alpha: 1)
|
|
|
+ var colorIcon = NCBrandColor.sharedInstance.brand
|
|
|
+
|
|
|
+ init (themingColor : UIColor) {
|
|
|
+ super.init()
|
|
|
+
|
|
|
+ colorIcon = themingColor
|
|
|
+ }
|
|
|
|
|
|
func createMenuPlain(view : UIView) {
|
|
|
|
|
@@ -57,16 +66,16 @@ class CreateMenuAdd: NSObject {
|
|
|
actionSheet.disableButtonTextAttributes = fontDisable
|
|
|
|
|
|
actionSheet.cancelButtonTitle = NSLocalizedString("_cancel_", comment: "")
|
|
|
-
|
|
|
- actionSheet.addButton(withTitle: NSLocalizedString("_create_folder_", comment: ""), image: UIImage(named: image_folder), backgroundColor: UIColor.white, height: 50.0 ,type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
|
|
|
+
|
|
|
+ actionSheet.addButton(withTitle: NSLocalizedString("_create_folder_", comment: ""), image: CCGraphics.changeThemingColorImage(UIImage(named: image_folder), color: colorIcon), backgroundColor: UIColor.white, height: 50.0 ,type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
|
|
|
appDelegate.activeMain.returnCreate(Int(k_returnCreateFolderPlain))
|
|
|
})
|
|
|
|
|
|
- actionSheet.addButton(withTitle: NSLocalizedString("_upload_photos_videos_", comment: ""), image: UIImage(named: image_MenuUploadPhoto), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
|
|
|
+ actionSheet.addButton(withTitle: NSLocalizedString("_upload_photos_videos_", comment: ""), image: CCGraphics.changeThemingColorImage(UIImage(named: image_MenuUploadPhoto), color: colorIcon), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
|
|
|
appDelegate.activeMain.returnCreate(Int(k_returnCreateFotoVideoPlain))
|
|
|
})
|
|
|
|
|
|
- actionSheet.addButton(withTitle: NSLocalizedString("_upload_file_", comment: ""), image: UIImage(named: image_MenuUploadFile), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
|
|
|
+ actionSheet.addButton(withTitle: NSLocalizedString("_upload_file_", comment: ""), image: CCGraphics.changeThemingColorImage(UIImage(named: image_MenuUploadFile), color: colorIcon), backgroundColor: UIColor.white, height: 50.0, type: AHKActionSheetButtonType.default, handler: {(AHKActionSheet) -> Void in
|
|
|
appDelegate.activeMain.returnCreate(Int(k_returnCreateFilePlain))
|
|
|
})
|
|
|
|