Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
parent
e7f1f4c3a4
commit
442e507519
@ -3,4 +3,22 @@
|
|||||||
uuid = "20B61D3C-CF97-4427-BF7D-EB393A559DFC"
|
uuid = "20B61D3C-CF97-4427-BF7D-EB393A559DFC"
|
||||||
type = "1"
|
type = "1"
|
||||||
version = "2.0">
|
version = "2.0">
|
||||||
|
<Breakpoints>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
uuid = "14EE7C9C-8F78-417E-AEF3-D655DB3F17B0"
|
||||||
|
shouldBeEnabled = "No"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "TheNoiseClock/Views/Clock/Components/TimeDisplayView.swift"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "64"
|
||||||
|
endingLineNumber = "64"
|
||||||
|
landmarkName = "body"
|
||||||
|
landmarkType = "24">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
</Breakpoints>
|
||||||
</Bucket>
|
</Bucket>
|
||||||
|
|||||||
@ -57,6 +57,7 @@ struct TimeDisplayView: View {
|
|||||||
var body: some View {
|
var body: some View {
|
||||||
GeometryReader { proxy in
|
GeometryReader { proxy in
|
||||||
let containerSize = proxy.size
|
let containerSize = proxy.size
|
||||||
|
let portraitMode = containerSize.height >= containerSize.width
|
||||||
let portrait = !forceHorizontalMode && containerSize.height >= containerSize.width
|
let portrait = !forceHorizontalMode && containerSize.height >= containerSize.width
|
||||||
|
|
||||||
// Use optimal font sizing based on actual container size
|
// Use optimal font sizing based on actual container size
|
||||||
@ -115,13 +116,14 @@ struct TimeDisplayView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .center)
|
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .center)
|
||||||
|
.offset(y: portraitMode && forceHorizontalMode ? -containerSize.height * 0.10 : 0) // Push up in horizontal mode
|
||||||
.scaleEffect(finalScale, anchor: .center)
|
.scaleEffect(finalScale, anchor: .center)
|
||||||
.animation(UIConstants.AnimationCurves.smooth, value: finalScale)
|
.animation(UIConstants.AnimationCurves.smooth, value: finalScale)
|
||||||
.animation(UIConstants.AnimationCurves.smooth, value: showSeconds) // Smooth animation for seconds toggle
|
.animation(UIConstants.AnimationCurves.smooth, value: showSeconds) // Smooth animation for seconds toggle
|
||||||
.minimumScaleFactor(0.1)
|
.minimumScaleFactor(0.1)
|
||||||
.clipped() // Prevent overflow beyond bounds
|
.clipped() // Prevent overflow beyond bounds
|
||||||
}
|
}
|
||||||
.border(.yellow, width: 1)
|
//.border(.yellow, width: 1)
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
.onOrientationChange() // Force updates on orientation changes
|
.onOrientationChange() // Force updates on orientation changes
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,10 +33,10 @@ struct TimeSegment: View {
|
|||||||
fontDesign: fontDesign
|
fontDesign: fontDesign
|
||||||
)
|
)
|
||||||
.frame(width: digitWidth)
|
.frame(width: digitWidth)
|
||||||
.border(.red, width: 1)
|
//.border(.red, width: 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.border(Color.green, width: 1)
|
//.border(Color.green, width: 1)
|
||||||
.frame(maxHeight: .infinity)
|
.frame(maxHeight: .infinity)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user