Improves helder
This commit is contained in:
@@ -8,6 +8,8 @@ struct EditorPane: View {
|
||||
let presentation: EditorPresentation
|
||||
/// View → Zoom.
|
||||
var fontScale: CGFloat = 1
|
||||
/// False while the File pane toggle hides the column: the code view then takes no focus or select-all.
|
||||
var isColumnShown = true
|
||||
|
||||
var body: some View {
|
||||
let path = presentation.path
|
||||
@@ -15,7 +17,7 @@ struct EditorPane: View {
|
||||
ZStack {
|
||||
// Kept alive while hidden, so a trip to Preview keeps each file's undo history and colours.
|
||||
if presentation.kind == .text {
|
||||
CodeEditorView(configuration: configuration(path, isShown: showsCode), actions: actions)
|
||||
CodeEditorView(configuration: configuration(path, isShown: showsCode && isColumnShown), actions: actions)
|
||||
.opacity(showsCode ? 1 : 0)
|
||||
.allowsHitTesting(showsCode)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user