Make review panel resize content
This commit is contained in:
@@ -394,18 +394,20 @@ struct ContentView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame(minWidth: 240, idealWidth: 300, maxWidth: 340, minHeight: 220, maxHeight: 300)
|
||||
.frame(minWidth: 240, idealWidth: 300, maxWidth: 340, maxHeight: .infinity)
|
||||
|
||||
if let clip = selectedClip {
|
||||
clipEditor(clip)
|
||||
} else {
|
||||
Text("Kein Clip ausgewählt")
|
||||
.foregroundStyle(.secondary)
|
||||
.frame(maxWidth: .infinity, minHeight: 220)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .top)
|
||||
}
|
||||
}
|
||||
.frame(maxHeight: .infinity, alignment: .top)
|
||||
}
|
||||
.padding(10)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
|
||||
.background(Color(nsColor: .controlBackgroundColor))
|
||||
.clipShape(RoundedRectangle(cornerRadius: 8))
|
||||
.overlay(
|
||||
@@ -422,10 +424,13 @@ struct ContentView: View {
|
||||
set: { processor.updateClip(clip, segmentStart: $0) }
|
||||
)
|
||||
|
||||
return VStack(alignment: .leading, spacing: 8) {
|
||||
return GeometryReader { proxy in
|
||||
let previewHeight = min(max(150, proxy.size.height - 160), 420)
|
||||
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
ClipPreviewView(clip: liveClip)
|
||||
.id(liveClip.sourcePath)
|
||||
.frame(height: 180)
|
||||
.frame(height: previewHeight)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 6))
|
||||
|
||||
Text(liveClip.displayName)
|
||||
@@ -470,7 +475,9 @@ struct ContentView: View {
|
||||
}
|
||||
.disabled(processor.state.isRunning || maxStart <= 0)
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .topLeading)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
|
||||
}
|
||||
|
||||
private func currentClip(id: UUID) -> GrowthLapseProjectClip? {
|
||||
@@ -656,7 +663,7 @@ private struct ResizableVerticalStack<Top: View, Bottom: View>: View {
|
||||
|
||||
VStack(spacing: 0) {
|
||||
top()
|
||||
.frame(height: clampedTopHeight)
|
||||
.frame(height: clampedTopHeight, alignment: .top)
|
||||
.clipped()
|
||||
|
||||
SplitHandle()
|
||||
@@ -678,7 +685,7 @@ private struct ResizableVerticalStack<Top: View, Bottom: View>: View {
|
||||
.help("Ziehen, um Clip-Nachbearbeitung und Log größer oder kleiner zu machen.")
|
||||
|
||||
bottom()
|
||||
.frame(height: max(minBottomHeight, availableHeight - clampedTopHeight))
|
||||
.frame(height: max(minBottomHeight, availableHeight - clampedTopHeight), alignment: .top)
|
||||
.clipped()
|
||||
}
|
||||
.onAppear {
|
||||
|
||||
Reference in New Issue
Block a user