parent
74cb622372
commit
18d880e2ea
|
@ -2,7 +2,7 @@
|
||||||
"colors" : [
|
"colors" : [
|
||||||
{
|
{
|
||||||
"color" : {
|
"color" : {
|
||||||
"color-space" : "display-p3",
|
"color-space" : "srgb",
|
||||||
"components" : {
|
"components" : {
|
||||||
"alpha" : "1.000",
|
"alpha" : "1.000",
|
||||||
"blue" : "0xFD",
|
"blue" : "0xFD",
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"color" : {
|
"color" : {
|
||||||
"color-space" : "display-p3",
|
"color-space" : "srgb",
|
||||||
"components" : {
|
"components" : {
|
||||||
"alpha" : "1.000",
|
"alpha" : "1.000",
|
||||||
"blue" : "0x52",
|
"blue" : "0x52",
|
||||||
|
|
|
@ -89,24 +89,38 @@ struct OnboardingContentView: View {
|
||||||
/// while iPhone X, 11, etc are different family devices, capable to use more of the space.
|
/// while iPhone X, 11, etc are different family devices, capable to use more of the space.
|
||||||
extension OnboardingContentView {
|
extension OnboardingContentView {
|
||||||
var circularFrameUniformSize: CGFloat {
|
var circularFrameUniformSize: CGFloat {
|
||||||
let aspect = height / width
|
var deviceMultiplier = 1.0
|
||||||
let deviceMultiplier = 1.0 + (((aspect / 1.725) - 1.0) * 2.0)
|
|
||||||
|
|
||||||
return width * (0.6 * deviceMultiplier)
|
if width > 0.0 {
|
||||||
|
let aspect = height / width
|
||||||
|
deviceMultiplier = 1.0 + (((aspect / 1.725) - 1.0) * 2.0)
|
||||||
|
}
|
||||||
|
|
||||||
|
return width * 0.6 * deviceMultiplier
|
||||||
}
|
}
|
||||||
|
|
||||||
var circularFrameOffsetCoeffcient: CGFloat {
|
var circularFrameOffsetCoeffcient: CGFloat {
|
||||||
let aspect = height / width
|
var deviceMultiplier = 1.0
|
||||||
let deviceMultiplier = aspect / 1.725
|
|
||||||
|
if width > 0.0 {
|
||||||
|
let aspect = height / width
|
||||||
|
deviceMultiplier = aspect / 1.725
|
||||||
|
}
|
||||||
|
|
||||||
return 4.4 * deviceMultiplier
|
return 4.4 * deviceMultiplier
|
||||||
}
|
}
|
||||||
|
|
||||||
var descriptionOffsetCoefficient: Double {
|
var descriptionOffsetCoefficient: Double {
|
||||||
let aspect = height / width
|
if width > 0.0 {
|
||||||
let deviceMultiplier = 1.0 + (((aspect / 1.725) - 1.0) * 2.5)
|
let aspect = height / width
|
||||||
|
let deviceMultiplier = 1.0 + (((aspect / 1.725) - 1.0) * 2.5)
|
||||||
return 8.0 / deviceMultiplier
|
|
||||||
|
if abs(deviceMultiplier) > 0.0 {
|
||||||
|
return 8.0 / deviceMultiplier
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 8.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,13 +29,13 @@ fileprivate struct Neumorphic: ViewModifier {
|
||||||
color: Asset.Colors.Onboarding.neumorphicDarkSide.color,
|
color: Asset.Colors.Onboarding.neumorphicDarkSide.color,
|
||||||
radius: 15,
|
radius: 15,
|
||||||
x: colorScheme == .light && !isPressed ? 10 : -10,
|
x: colorScheme == .light && !isPressed ? 10 : -10,
|
||||||
y: colorScheme == .light && !isPressed ? 10 : 10
|
y: 10
|
||||||
)
|
)
|
||||||
.shadow(
|
.shadow(
|
||||||
color: Asset.Colors.Onboarding.neumorphicLightSide.color,
|
color: Asset.Colors.Onboarding.neumorphicLightSide.color,
|
||||||
radius: 10,
|
radius: 10,
|
||||||
x: colorScheme == .light && !isPressed ? -12 : 12,
|
x: colorScheme == .light && !isPressed ? -12 : 12,
|
||||||
y: colorScheme == .light && !isPressed ? -12 : -12
|
y: -12
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue