changeset 228:74686b4a0fde

Add new logos
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Mon, 01 Mar 2021 18:42:03 +0000
parents aff36490ae4d
children bac435954c80
files LazyBear/Assets.xcassets/Alternative icon/angryIcon.imageset/Contents.json LazyBear/Assets.xcassets/Alternative icon/angryIcon.imageset/angry.png LazyBear/Assets.xcassets/Alternative icon/blueIcon.imageset/Contents.json LazyBear/Assets.xcassets/Alternative icon/blueIcon.imageset/blue.png LazyBear/Assets.xcassets/Alternative icon/graffitiIcon.imageset/Contents.json LazyBear/Assets.xcassets/Alternative icon/graffitiIcon.imageset/graffiti.png LazyBear/Assets.xcassets/Alternative icon/greenIcon.imageset/Contents.json LazyBear/Assets.xcassets/Alternative icon/greenIcon.imageset/green.png LazyBear/Assets.xcassets/Alternative icon/matteBlackIcon.imageset/Contents.json LazyBear/Assets.xcassets/Alternative icon/matteBlackIcon.imageset/matteBlack.png LazyBear/Assets.xcassets/Alternative icon/matteWhiteIcon.imageset/Contents.json LazyBear/Assets.xcassets/Alternative icon/matteWhiteIcon.imageset/matteWhite.png LazyBear/Assets.xcassets/Alternative icon/pinkIcon.imageset/Contents.json LazyBear/Assets.xcassets/Alternative icon/pinkIcon.imageset/pink.png LazyBear/Assets.xcassets/Alternative icon/redIcon.imageset/Contents.json LazyBear/Assets.xcassets/Alternative icon/redIcon.imageset/red.png LazyBear/Info.plist LazyBear/Models/IconModel.swift LazyBear/Resources/alternativeIcons.json LazyBear/Resources/angry.png LazyBear/Resources/blue.png LazyBear/Resources/default.png LazyBear/Resources/graffiti.png LazyBear/Resources/green.png LazyBear/Resources/matteBlack.png LazyBear/Resources/matteWhite.png LazyBear/Resources/pink.png LazyBear/Resources/red.png LazyBear/UI/IconPicker.swift assets/logos/3d.afdesign assets/logos/angry.afdesign assets/logos/default.afdesign assets/logos/plain.afdesign
diffstat 33 files changed, 272 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/LazyBear/Assets.xcassets/Alternative icon/angryIcon.imageset/Contents.json	Sun Feb 28 18:38:48 2021 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-{
-  "images" : [
-    {
-      "filename" : "angry.png",
-      "idiom" : "universal",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "3x"
-    }
-  ],
-  "info" : {
-    "author" : "xcode",
-    "version" : 1
-  }
-}
Binary file LazyBear/Assets.xcassets/Alternative icon/angryIcon.imageset/angry.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LazyBear/Assets.xcassets/Alternative icon/blueIcon.imageset/Contents.json	Mon Mar 01 18:42:03 2021 +0000
@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "filename" : "blue.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}
Binary file LazyBear/Assets.xcassets/Alternative icon/blueIcon.imageset/blue.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LazyBear/Assets.xcassets/Alternative icon/graffitiIcon.imageset/Contents.json	Mon Mar 01 18:42:03 2021 +0000
@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "filename" : "graffiti.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}
Binary file LazyBear/Assets.xcassets/Alternative icon/graffitiIcon.imageset/graffiti.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LazyBear/Assets.xcassets/Alternative icon/greenIcon.imageset/Contents.json	Mon Mar 01 18:42:03 2021 +0000
@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "filename" : "green.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}
Binary file LazyBear/Assets.xcassets/Alternative icon/greenIcon.imageset/green.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LazyBear/Assets.xcassets/Alternative icon/matteBlackIcon.imageset/Contents.json	Mon Mar 01 18:42:03 2021 +0000
@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "filename" : "matteBlack.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}
Binary file LazyBear/Assets.xcassets/Alternative icon/matteBlackIcon.imageset/matteBlack.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LazyBear/Assets.xcassets/Alternative icon/matteWhiteIcon.imageset/Contents.json	Mon Mar 01 18:42:03 2021 +0000
@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "filename" : "matteWhite.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}
Binary file LazyBear/Assets.xcassets/Alternative icon/matteWhiteIcon.imageset/matteWhite.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LazyBear/Assets.xcassets/Alternative icon/pinkIcon.imageset/Contents.json	Mon Mar 01 18:42:03 2021 +0000
@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "filename" : "pink.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}
Binary file LazyBear/Assets.xcassets/Alternative icon/pinkIcon.imageset/pink.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LazyBear/Assets.xcassets/Alternative icon/redIcon.imageset/Contents.json	Mon Mar 01 18:42:03 2021 +0000
@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "filename" : "red.png",
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}
Binary file LazyBear/Assets.xcassets/Alternative icon/redIcon.imageset/red.png has changed
--- a/LazyBear/Info.plist	Sun Feb 28 18:38:48 2021 +0000
+++ b/LazyBear/Info.plist	Mon Mar 01 18:42:03 2021 +0000
@@ -12,15 +12,69 @@
 	<dict>
 		<key>CFBundleAlternateIcons</key>
 		<dict>
-			<key>angryIcon</key>
+			<key>blueIcon</key>
 			<dict>
 				<key>CFBundleIconFiles</key>
 				<array>
-					<string>angry.png</string>
+					<string>blue.png</string>
 				</array>
 				<key>UIPrerenderedIcon</key>
 				<false/>
 			</dict>
+            <key>greenIcon</key>
+            <dict>
+                <key>CFBundleIconFiles</key>
+                <array>
+                    <string>green.png</string>
+                </array>
+                <key>UIPrerenderedIcon</key>
+                <false/>
+            </dict>
+            <key>pinkIcon</key>
+            <dict>
+                <key>CFBundleIconFiles</key>
+                <array>
+                    <string>pink.png</string>
+                </array>
+                <key>UIPrerenderedIcon</key>
+                <false/>
+            </dict>
+            <key>redIcon</key>
+            <dict>
+                <key>CFBundleIconFiles</key>
+                <array>
+                    <string>red.png</string>
+                </array>
+                <key>UIPrerenderedIcon</key>
+                <false/>
+            </dict>
+            <key>matteBlackIcon</key>
+            <dict>
+                <key>CFBundleIconFiles</key>
+                <array>
+                    <string>matteBlack.png</string>
+                </array>
+                <key>UIPrerenderedIcon</key>
+                <false/>
+            </dict>
+            <key>matteWhiteIcon</key>
+            <dict>
+                <key>CFBundleIconFiles</key>
+                <array>
+                    <string>matteWhite.png</string>
+                </array>
+                <key>UIPrerenderedIcon</key>
+                <false/>
+            </dict>
+            <key>graffitiIcon</key>
+            <dict>
+                <key>CFBundleIconFiles</key>
+                <array>
+                    <string>graffiti.png</string>
+                </array>
+                <key>UIPrerenderedIcon</key>
+                <false/>
+            </dict>
 		</dict>
 		<key>CFBundlePrimaryIcon</key>
 		<dict>
--- a/LazyBear/Models/IconModel.swift	Sun Feb 28 18:38:48 2021 +0000
+++ b/LazyBear/Models/IconModel.swift	Mon Mar 01 18:42:03 2021 +0000
@@ -10,4 +10,5 @@
 struct IconModel: Codable, Hashable {
     var name: String
     var file: String
+    var background: Bool
 }
--- a/LazyBear/Resources/alternativeIcons.json	Sun Feb 28 18:38:48 2021 +0000
+++ b/LazyBear/Resources/alternativeIcons.json	Mon Mar 01 18:42:03 2021 +0000
@@ -1,10 +1,42 @@
 [
     {
         "name": "Default",
-        "file": "defaultIcon"
+        "file": "defaultIcon",
+        "background": false
+    },
+    {
+        "name": "Blue",
+        "file": "blueIcon",
+        "background": false
+    },
+    {
+        "name": "Green",
+        "file": "greenIcon",
+        "background": false
+    },
+    {
+        "name": "Pink",
+        "file": "pinkIcon",
+        "background": false
     },
     {
-        "name": "Angry bear",
-        "file": "angryIcon"
+        "name": "Red",
+        "file": "redIcon",
+        "background": false
+    },
+    {
+        "name": "Matte black",
+        "file": "matteBlackIcon",
+        "background": true
+    },
+    {
+        "name": "Matte white",
+        "file": "matteWhiteIcon",
+        "background": false
+    },
+    {
+        "name": "Graffiti",
+        "file": "graffitiIcon",
+        "background": false
     }
 ]
Binary file LazyBear/Resources/angry.png has changed
Binary file LazyBear/Resources/blue.png has changed
Binary file LazyBear/Resources/default.png has changed
Binary file LazyBear/Resources/graffiti.png has changed
Binary file LazyBear/Resources/green.png has changed
Binary file LazyBear/Resources/matteBlack.png has changed
Binary file LazyBear/Resources/matteWhite.png has changed
Binary file LazyBear/Resources/pink.png has changed
Binary file LazyBear/Resources/red.png has changed
--- a/LazyBear/UI/IconPicker.swift	Sun Feb 28 18:38:48 2021 +0000
+++ b/LazyBear/UI/IconPicker.swift	Mon Mar 01 18:42:03 2021 +0000
@@ -9,21 +9,44 @@
 
 struct IconPicker: View {
     var body: some View {
-        List(icons, id:\.name) { icon in
-            Button(action: { changeIcon(key: icon.file) }) {
-                HStack {
-                    Image(icon.file)
-                        .resizable()
-                        .cornerRadius(20)
-                        .frame(width: 70, height: 70)
-                        
-                    Text(icon.name)
+        List {
+            Section(header: Text("Without background")) {
+                ForEach(icons, id: \.name) { icon in
+                    if !icon.background {
+                        IconRow(icon: icon)
+                    }
+                }
+            }
+            
+            Section(header: Text("With background")) {
+                ForEach(icons, id: \.name) { icon in
+                    if icon.background {
+                        IconRow(icon: icon)
+                    }
                 }
             }
-            .buttonStyle(PlainButtonStyle())
         }
         .listStyle(GroupedListStyle())
     }
+}
+
+struct IconRow: View {
+    @Environment(\.colorScheme) var colorScheme  // Detect dark mode
+    var icon: IconModel
+    
+    var body: some View {
+        Button(action: { changeIcon(key: icon.file) }) {
+            HStack {
+                Image(icon.file)
+                    .resizable()
+                    .cornerRadius(20)
+                    .frame(width: 70, height: 70)
+                    
+                Text(icon.name)
+                    .foregroundColor(colorScheme == .dark ? .white: .black)
+            }
+        }
+    }
     
     private func changeIcon(key: String) {
         if key != "defaultIcon" {
Binary file assets/logos/3d.afdesign has changed
Binary file assets/logos/angry.afdesign has changed
Binary file assets/logos/default.afdesign has changed
Binary file assets/logos/plain.afdesign has changed