@@ -98,7 +98,6 @@ struct CreateWidgetView: View {
|
||||
}
|
||||
|
||||
var bottomBarButtons: some View {
|
||||
Group {
|
||||
HStack(alignment: .center, spacing: 0) {
|
||||
Button(action: {
|
||||
EventLogger.log(event: "create_widget_view_shuffle")
|
||||
@@ -110,7 +109,7 @@ struct CreateWidgetView: View {
|
||||
|
||||
})
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
.frame(height: 40)
|
||||
.frame(minHeight: 40, maxHeight: .infinity)
|
||||
.background(.blue)
|
||||
|
||||
Button(action: {
|
||||
@@ -127,7 +126,7 @@ struct CreateWidgetView: View {
|
||||
|
||||
})
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
.frame(height: 40)
|
||||
.frame(minHeight: 40, maxHeight: .infinity)
|
||||
.background(.green)
|
||||
|
||||
Button(action: {
|
||||
@@ -143,8 +142,8 @@ struct CreateWidgetView: View {
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
|
||||
})
|
||||
.frame(height: 40)
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
.frame(minHeight: 40, maxHeight: .infinity)
|
||||
.background(.pink)
|
||||
|
||||
if customWidget.isSaved {
|
||||
@@ -160,16 +159,15 @@ struct CreateWidgetView: View {
|
||||
.foregroundColor(Color(UIColor.white))
|
||||
|
||||
})
|
||||
.frame(height: 40)
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
.frame(minHeight: 40, maxHeight: .infinity)
|
||||
.background(.orange)
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame(minHeight: 40, maxHeight: .infinity)
|
||||
}
|
||||
|
||||
var colorOptions: some View {
|
||||
Group {
|
||||
VStack {
|
||||
HStack(spacing: 0) {
|
||||
VStack(alignment: .center) {
|
||||
@@ -235,15 +233,14 @@ struct CreateWidgetView: View {
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
}
|
||||
}
|
||||
.multilineTextAlignment(.center)
|
||||
.padding()
|
||||
.background(
|
||||
theme.currentTheme.secondaryBGColor
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
var bgImageOptions: some View {
|
||||
Group {
|
||||
HStack {
|
||||
ForEach(CustomWidgetBackGroundOptions.selectable, id: \.self) { bg in
|
||||
Image(bg.rawValue, bundle: .main)
|
||||
@@ -260,7 +257,7 @@ struct CreateWidgetView: View {
|
||||
.onTapGesture {
|
||||
update(background: .random)
|
||||
}
|
||||
|
||||
Divider()
|
||||
ColorPicker("", selection: $customWidget.bgOverlayColor)
|
||||
}
|
||||
.padding()
|
||||
@@ -268,54 +265,49 @@ struct CreateWidgetView: View {
|
||||
theme.currentTheme.secondaryBGColor
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
var faceImageOptions: some View {
|
||||
Group {
|
||||
HStack(alignment: .center) {
|
||||
Spacer()
|
||||
VStack(alignment: .center) {
|
||||
Text(String(localized: "create_widget_view_left_eye"))
|
||||
.onTapGesture(perform: {
|
||||
showLeftEyeImagePicker.toggle()
|
||||
})
|
||||
.foregroundColor(textColor)
|
||||
.foregroundColor(textColor)
|
||||
}
|
||||
Spacer()
|
||||
VStack(alignment: .center) {
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
Divider()
|
||||
Text(String(localized: "create_widget_view_right_eye"))
|
||||
.onTapGesture(perform: {
|
||||
showRightEyeImagePicker.toggle()
|
||||
})
|
||||
.foregroundColor(textColor)
|
||||
}
|
||||
Spacer()
|
||||
VStack(alignment: .center) {
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
Divider()
|
||||
Text(String(localized: "create_widget_view_mouth"))
|
||||
.onTapGesture(perform: {
|
||||
showMuthImagePicker.toggle()
|
||||
})
|
||||
.foregroundColor(textColor)
|
||||
.foregroundColor(textColor)
|
||||
}
|
||||
Spacer()
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
}
|
||||
.padding()
|
||||
.background(
|
||||
theme.currentTheme.secondaryBGColor
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
GeometryReader { geo in
|
||||
VStack(spacing: 0) {
|
||||
widgetView
|
||||
.cornerRadius(10)
|
||||
.padding()
|
||||
.frame(width: geo.size.width, height: geo.size.width)
|
||||
|
||||
Spacer()
|
||||
|
||||
ScrollView {
|
||||
VStack(spacing: 0) {
|
||||
Divider().background(Color(UIColor.tertiarySystemBackground))
|
||||
|
||||
faceImageOptions
|
||||
@@ -332,6 +324,9 @@ struct CreateWidgetView: View {
|
||||
|
||||
bottomBarButtons
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.sheet(isPresented: $showRightEyeImagePicker) {
|
||||
ImagePickerGridView(pickedImageClosure: { image in
|
||||
update(eye: .right, eyeOption: image)
|
||||
|
||||
Reference in New Issue
Block a user