looks better
parent
c934dd5c21
commit
5c48d1387a
|
@ -82,6 +82,9 @@ struct Pane: View {
|
||||||
@State var segs: [SegDenorm]
|
@State var segs: [SegDenorm]
|
||||||
@State var selectedRibbon: [Ribbon]
|
@State var selectedRibbon: [Ribbon]
|
||||||
|
|
||||||
|
@State var width: CGFloat
|
||||||
|
@State var height: CGFloat
|
||||||
|
|
||||||
@State var dragOffset = CGFloat()
|
@State var dragOffset = CGFloat()
|
||||||
|
|
||||||
@State var refresh: Bool = false
|
@State var refresh: Bool = false
|
||||||
|
@ -93,7 +96,6 @@ struct Pane: View {
|
||||||
// var handleVisibilityChanged: (String, VisibilityChange, VisibilityTracker<String>) -> Void
|
// var handleVisibilityChanged: (String, VisibilityChange, VisibilityTracker<String>) -> Void
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
GeometryReader { geometry in
|
|
||||||
ScrollViewReader { proxy in
|
ScrollViewReader { proxy in
|
||||||
VisibilityTrackingScrollView(action: handleVisibilityChanged) {
|
VisibilityTrackingScrollView(action: handleVisibilityChanged) {
|
||||||
LazyVStack {
|
LazyVStack {
|
||||||
|
@ -185,8 +187,7 @@ struct Pane: View {
|
||||||
}
|
}
|
||||||
.zIndex(1)
|
.zIndex(1)
|
||||||
.background(Color(red: 0.2, green: 0.2, blue: 0.2))
|
.background(Color(red: 0.2, green: 0.2, blue: 0.2))
|
||||||
.frame(width: geometry.size.width - 50, height: geometry.size.height / 2 - vertSep)
|
.frame(width: width, height: height)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleVisibilityChanged(_: String, change _: VisibilityChange, tracker: VisibilityTracker<String>) {
|
func handleVisibilityChanged(_: String, change _: VisibilityChange, tracker: VisibilityTracker<String>) {
|
||||||
|
|
|
@ -295,7 +295,10 @@ struct ContentView: View {
|
||||||
// Top pane
|
// Top pane
|
||||||
Pane(paneConnector: paneConnector,
|
Pane(paneConnector: paneConnector,
|
||||||
segs: segs,
|
segs: segs,
|
||||||
selectedRibbon: selectedRibbon)
|
selectedRibbon: selectedRibbon,
|
||||||
|
width: geometry.size.width - 50,
|
||||||
|
height: geometry.size.height / 2 - vertSep
|
||||||
|
)
|
||||||
|
|
||||||
//////
|
//////
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue