Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ end
end

lane :generate_appicon do
iconPath = "ownCloud/Resources/Theming/icon-1024.png"
iconPath = "ownCloud/Resources/Theming/branding-icon.png"
if File.exist?("../" + iconPath)
appicon(
appicon_image_file: iconPath,
Expand Down
8 changes: 8 additions & 0 deletions ownCloud/App Controllers/AppRootViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@ open class AppRootViewController: EmbeddingViewController, BrowserNavigationView
messageView.elementInsets = NSDirectionalEdgeInsets(top: 25, leading: 50, bottom: 50, trailing: 50)

let rootView = ThemeCSSView(withSelectors: [.modal, .welcome])

if let image = Branding.shared.brandedImageNamed(.loginBackground) {
messageView.isOpaque = false
let backgroundImageView = UIImageView(image: image)
backgroundImageView.contentMode = .scaleAspectFill
rootView.embed(toFillWith: backgroundImageView)
}

rootView.embed(centered: messageView, minimumInsets: NSDirectionalEdgeInsets(top: 20, leading: 20, bottom: 20, trailing: 20))

let messageViewController = UIViewController()
Expand Down
154 changes: 77 additions & 77 deletions ownCloud/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,116 +1,116 @@
{
"images" : [
{
"size" : "20x20",
"idiom": "iphone",
"filename" : "[email protected]",
"scale": "2x"
"images": [
{
"idiom": "ios-marketing",
"filename": "icon-1024-1024x1024.png",
"scale": "1x",
"size": "1024x1024"
},
{
"size" : "20x20",
{
"idiom": "iphone",
"filename" : "[email protected]",
"scale": "3x"
"filename": "icon-1024-180x180.png",
"scale": "3x",
"size": "60x60"
},
{
"size" : "20x20",
{
"idiom": "ipad",
"filename" : "icon-20.png",
"scale": "1x"
"filename": "icon-1024-167x167.png",
"scale": "2x",
"size": "83.5x83.5"
},
{
"size" : "20x20",
"idiom": "ipad",
"filename" : "[email protected]",
"scale": "2x"
"filename": "icon-1024-152x152.png",
"scale": "2x",
"size": "76x76"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
"idiom": "iphone",
"filename": "icon-1024-120x120.png",
"scale": "3x",
"size": "40x40"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x"
"idiom": "iphone",
"filename": "icon-1024-120x120.png",
"scale": "2x",
"size": "60x60"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
"idiom": "iphone",
"filename": "icon-1024-87x87.png",
"scale": "3x",
"size": "29x29"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x"
"idiom": "ipad",
"filename": "icon-1024-80x80.png",
"scale": "2x",
"size": "40x40"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "2x"
"idiom": "iphone",
"filename": "icon-1024-80x80.png",
"scale": "2x",
"size": "40x40"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "[email protected]",
"scale" : "3x"
"idiom": "ipad",
"filename": "icon-1024-76x76.png",
"scale": "1x",
"size": "76x76"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "icon-29.png",
"scale" : "1x"
"idiom": "iphone",
"filename": "icon-1024-60x60.png",
"scale": "3x",
"size": "20x20"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
"idiom": "ipad",
"filename": "icon-1024-58x58.png",
"scale": "2x",
"size": "29x29"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "icon-40.png",
"scale" : "1x"
"idiom": "iphone",
"filename": "icon-1024-58x58.png",
"scale": "2x",
"size": "29x29"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
"idiom": "ipad",
"filename": "icon-1024-40x40.png",
"scale": "1x",
"size": "40x40"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "icon-76.png",
"scale" : "1x"
"idiom": "iphone",
"filename": "icon-1024-40x40.png",
"scale": "2x",
"size": "20x20"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
"idiom": "ipad",
"filename": "icon-1024-40x40.png",
"scale": "2x",
"size": "20x20"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "[email protected]",
"scale" : "2x"
"idiom": "ipad",
"filename": "icon-1024-29x29.png",
"scale": "1x",
"size": "29x29"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "icon-1024.png",
"scale" : "1x"
"idiom": "ipad",
"filename": "icon-1024-20x20.png",
"scale": "1x",
"size": "20x20"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"info": {
"version": 1,
"author": "fastlane"
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
5 changes: 5 additions & 0 deletions ownCloudAppShared/UIKit Extension/UIColor+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ extension UIColor {
self.init(red: CGFloat(red) / 255.0, green: CGFloat(green) / 255.0, blue: CGFloat(blue) / 255.0, alpha: CGFloat(alpha))
}

public convenience init(hexa unsignedRGBAHex: UInt) {
let rgbaHex = Int(unsignedRGBAHex)
self.init(red: (rgbaHex >> 24) & 0xFF, green: (rgbaHex >> 16) & 0xFF, blue: (rgbaHex >> 8) & 0xFF, alpha: Float(rgbaHex & 0xFF) / 255.0)
}

public convenience init(hex unsignedRGBHex: UInt, alpha: Float = 1.0) {
let rgbHex = Int(unsignedRGBHex)
self.init(red: (rgbHex >> 16) & 0xFF, green: (rgbHex >> 8) & 0xFF, blue: (rgbHex & 0xFF), alpha: alpha)
Expand Down
4 changes: 2 additions & 2 deletions ownCloudAppShared/User Interface/Theme/ThemeCollection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,8 @@ public class ThemeCollection : NSObject {
ThemeCSSRecord(selectors: [.vectorImage, .symbolColor], property: .fill, value: iconSymbolColor),

// Welcome screen
ThemeCSSRecord(selectors: [.welcome, .message, .background], property: .fill, value: lightBrandColor),
ThemeCSSRecord(selectors: [.welcome, .message, .title], property: .stroke, value: darkBrandSet.labelColor),
ThemeCSSRecord(selectors: [.welcome, .message, .background], property: .fill, value: UIColor(red: 0, green: 0, blue: 0, alpha: 0.2)),
ThemeCSSRecord(selectors: [.welcome, .message, .title], property: .stroke, value: darkBrandSet.labelColor),
ThemeCSSRecord(selectors: [.welcome, .message, .button], property: .stroke, value: darkBrandSet.labelColor),
ThemeCSSRecord(selectors: [.welcome, .message, .button], property: .fill, value: darkBrandColor),

Expand Down
12 changes: 12 additions & 0 deletions ownCloudAppShared/User Interface/Theme/ThemeStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ public extension String {
}
}

if self.hasPrefix("#"), self.count == 9 {
// Format: #RRGGBBAA
if let hexRGB = UInt(self.replacingOccurrences(of: "#", with: ""), radix: 16) {
return UIColor(hexa: hexRGB)
}
} else if self.count == 8 {
// Format: RRGGBBAA
if let hexRGB = UInt(self, radix: 16) {
return UIColor(hexa: hexRGB)
}
}

return nil
}
}
Expand Down