spacing on custom icon widget
create color extension for random widget 512x512 ... 1024x1024 didn't work clean up Icon Widget View
This commit is contained in:
@@ -55,17 +55,9 @@ struct CreateIconView: View {
|
||||
}
|
||||
|
||||
func createRandom() {
|
||||
customIcon.bgColor = Color(
|
||||
red: .random(in: 0...1),
|
||||
green: .random(in: 0...1),
|
||||
blue: .random(in: 0...1)
|
||||
)
|
||||
|
||||
customIcon.innerColor = Color(
|
||||
red: .random(in: 0...1),
|
||||
green: .random(in: 0...1),
|
||||
blue: .random(in: 0...1)
|
||||
)
|
||||
customIcon.bgColor = Color.random()
|
||||
customIcon.innerColor = Color.random()
|
||||
customIcon.bgOverlayColor = Color.random()
|
||||
|
||||
update(eye: .left, eyeOption: EyeOptions.allCases.randomElement()!)
|
||||
update(eye: .right, eyeOption: EyeOptions.allCases.randomElement()!)
|
||||
@@ -214,8 +206,8 @@ struct CreateIconView: View {
|
||||
|
||||
Button(action: {
|
||||
let bigIconView = IconView(customIcon: customIcon, isPreview: false)
|
||||
.frame(width: 1024, height: 1024, alignment: .center)
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.frame(width: 512, height: 512, alignment: .center)
|
||||
.aspectRatio(contentMode: .fill)
|
||||
let icon = bigIconView.snapshot()
|
||||
if let data = icon.pngData() {
|
||||
savedCustomIcon = data
|
||||
|
||||
Reference in New Issue
Block a user