ENH: Fixed sizing of the main window. #1
1 changed files with 47 additions and 41 deletions
|
@ -41,6 +41,10 @@ struct ContentView: View {
|
|||
self.imageHeight = height
|
||||
}
|
||||
|
||||
ZStack {
|
||||
Color.black
|
||||
.ignoresSafeArea()
|
||||
|
||||
// ScrollView fills remaining height
|
||||
ScrollViewReader { proxy in
|
||||
ScrollView {
|
||||
|
@ -51,6 +55,7 @@ struct ContentView: View {
|
|||
Text(lines[index])
|
||||
.font(.system(.body, design: .monospaced))
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
|
||||
}
|
||||
|
||||
Color.clear.frame(height: 1).id("bottom")
|
||||
|
@ -64,27 +69,28 @@ struct ContentView: View {
|
|||
}
|
||||
}
|
||||
|
||||
// ScrollView {
|
||||
// VStack(alignment: .leading) {
|
||||
// TextEditor(text: $appState.output)
|
||||
// .font(.system(.body, design: .monospaced))
|
||||
// .frame(
|
||||
// width: geometry.size.width - 60,
|
||||
// height: max(0, geometry.size.height - imageHeight - 120) // - rough height of button row and padding
|
||||
// )
|
||||
// .padding()
|
||||
// .disabled(true)
|
||||
//
|
||||
// Text("")
|
||||
// .id("bottom")
|
||||
// }
|
||||
// }
|
||||
// .onChange(of: appState.output) { _, _ in
|
||||
// trimLinesIfNeeded()
|
||||
// withAnimation {
|
||||
// proxy.scrollTo("bottom", anchor: .bottom)
|
||||
// }
|
||||
// }
|
||||
// ScrollView {
|
||||
// VStack(alignment: .leading) {
|
||||
// TextEditor(text: $appState.output)
|
||||
// .font(.system(.body, design: .monospaced))
|
||||
// .frame(
|
||||
// width: geometry.size.width - 60,
|
||||
// height: max(0, geometry.size.height - imageHeight - 120) // - rough height of button row and padding
|
||||
// )
|
||||
// .padding()
|
||||
// .disabled(true)
|
||||
//
|
||||
// Text("")
|
||||
// .id("bottom")
|
||||
// }
|
||||
// }
|
||||
// .onChange(of: appState.output) { _, _ in
|
||||
// trimLinesIfNeeded()
|
||||
// withAnimation {
|
||||
// proxy.scrollTo("bottom", anchor: .bottom)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
// Buttons
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue