PhraseEditorUI // Fine-tweaks.

This commit is contained in:
ShikiSuen 2023-09-29 14:08:49 +08:00
parent 5b11ffec44
commit 6c2a3ee8b4
2 changed files with 11 additions and 6 deletions

View File

@ -246,12 +246,14 @@ public struct VwrPhraseEditorUI: View {
}
}
TextEditorEX(text: $txtContent)
.disabled(selInputMode == .imeModeNULL || isLoading)
.frame(minWidth: 320, minHeight: 240)
.onChange(of: fileChangeIndicator.id) { _ in
if Self.autoReloadExternalModifications { update() }
}
GroupBox {
TextEditorEX(text: $txtContent)
.disabled(selInputMode == .imeModeNULL || isLoading)
.frame(minWidth: 320, minHeight: 240)
.onChange(of: fileChangeIndicator.id) { _ in
if Self.autoReloadExternalModifications { update() }
}
}
VStack(spacing: 4) {
if selUserDataType != .theAssociates {

View File

@ -148,7 +148,10 @@ public struct TextEditorEX: NSViewRepresentable {
scrollview.borderType = .noBorder
scrollview.hasVerticalScroller = true
scrollview.hasHorizontalScroller = true
scrollview.documentView = textView
scrollview.scrollerStyle = .legacy
scrollview.autohidesScrollers = true
return scrollview
}