customize eye, mouth, face outline colors for custom icon
This commit is contained in:
@@ -70,7 +70,7 @@ struct IconView: View {
|
||||
)
|
||||
|
||||
Circle()
|
||||
.strokeBorder(Color.black, lineWidth: geo.size.width * 0.045)
|
||||
.strokeBorder(customIcon.circleStrokeColor, lineWidth: geo.size.width * 0.045)
|
||||
.background(Circle().fill(customIcon.innerColor))
|
||||
.frame(width: geo.size.width*facePercSize,
|
||||
height: geo.size.height*facePercSize,
|
||||
@@ -85,6 +85,7 @@ struct IconView: View {
|
||||
alignment: .center)
|
||||
.position(x: geo.size.width*0.4,
|
||||
y: geo.size.height*0.4)
|
||||
.foregroundColor(customIcon.leftEyeColor)
|
||||
|
||||
customIcon.rightEye
|
||||
.resizable()
|
||||
@@ -94,6 +95,7 @@ struct IconView: View {
|
||||
alignment: .center)
|
||||
.position(x: geo.size.width*0.6,
|
||||
y: geo.size.height*0.4)
|
||||
.foregroundColor(customIcon.rightEyeColor)
|
||||
|
||||
customIcon.mouth
|
||||
.resizable()
|
||||
@@ -103,6 +105,7 @@ struct IconView: View {
|
||||
alignment: .center)
|
||||
.position(x: geo.size.width*0.5,
|
||||
y: geo.size.height*0.59)
|
||||
.foregroundColor(customIcon.mouthColor)
|
||||
}
|
||||
.position(x: geo.size.width/2,
|
||||
y: geo.size.height/2 - entireFuckingViewOffset)
|
||||
@@ -127,7 +130,11 @@ struct IconView_Previews: PreviewProvider {
|
||||
background: IconView_Previews.backgrounds,
|
||||
bgColor: .red,
|
||||
innerColor: .green,
|
||||
bgOverlayColor: .orange),
|
||||
bgOverlayColor: .orange,
|
||||
rightEyeColor: .orange,
|
||||
leftEyeColor: .yellow,
|
||||
mouthColor: .green,
|
||||
circleStrokeColor: .pink),
|
||||
isPreview: true)
|
||||
.frame(width: 256, height: 256, alignment: .center)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user