From e5591ef9cc82023c4673a9d5afec738851e6f778 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 26 Nov 2023 20:38:58 +0800 Subject: [PATCH] CtlPrefWindow // Compatibility with vintage macOS versions. --- .../WindowControllers/CtlPrefWindow.swift | 15 +- .../WindowNIBs/Base.lproj/frmPrefWindow.xib | 1173 +++++++++-------- 2 files changed, 599 insertions(+), 589 deletions(-) diff --git a/Source/Modules/WindowControllers/CtlPrefWindow.swift b/Source/Modules/WindowControllers/CtlPrefWindow.swift index bab1a030..a0ffd5bb 100644 --- a/Source/Modules/WindowControllers/CtlPrefWindow.swift +++ b/Source/Modules/WindowControllers/CtlPrefWindow.swift @@ -498,23 +498,10 @@ extension CtlPrefWindow: NSToolbarDelegate { let temporaryViewOld = NSView(frame: existingContentView.frame) window.contentView = temporaryViewOld var newWindowRect = NSRect(origin: window.frame.origin, size: newView.bounds.size) - let shouldScroll: Bool = newWindowRect.size.height > 577 - if shouldScroll { newWindowRect.size.height = 577 } newWindowRect.size.height += kWindowTitleHeight newWindowRect.origin.y = window.frame.maxY - newWindowRect.height window.setFrame(newWindowRect, display: true, animate: animate) - if shouldScroll { - let scrollview = NSScrollView(frame: NSRect(x: 0, y: 0, width: 577, height: 577)) - scrollview.borderType = .noBorder - scrollview.hasVerticalScroller = true - scrollview.hasHorizontalScroller = false - scrollview.verticalScroller?.scrollerStyle = .legacy - scrollview.autoresizingMask = [.width, .height] - scrollview.documentView = newView - window.contentView = scrollview - } else { - window.contentView = newView - } + window.contentView = newView } var toolbarIdentifiers: [NSToolbarItem.Identifier] { diff --git a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib index d4dd739a..d76274f8 100644 --- a/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib +++ b/Source/WindowNIBs/Base.lproj/frmPrefWindow.xib @@ -928,567 +928,609 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This does: 1) On macOS 12 and later, if the Caps Lock gets turned off, then the internal switch for Shift-key / JIS-Eisu-key Alphanumerical Mode Toggle will also be switched off. 2) If you have turned off the same switch by JIS-Eisu key, then the Caps Lock gets turned off together. Note: vChewing has no way to recognize single hits of Shift key when Caps Lock is on. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This feature only needs to parse consecutive NSEvents passed by macOS built-in InputMethodKit framework, hence no necessity of asking end-users for extra privileges of monitoring global keyboard inputs. You are free to investigate our codebase or reverse-engineer this input method to see whether the above statement is trustable. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This does: 1) On macOS 12 and later, if the Caps Lock gets turned off, then the internal switch for Shift-key / JIS-Eisu-key Alphanumerical Mode Toggle will also be switched off. 2) If you have turned off the same switch by JIS-Eisu key, then the Caps Lock gets turned off together. Note: vChewing has no way to recognize single hits of Shift key when Caps Lock is on. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This feature only needs to parse consecutive NSEvents passed by macOS built-in InputMethodKit framework, hence no necessity of asking end-users for extra privileges of monitoring global keyboard inputs. You are free to investigate our codebase or reverse-engineer this input method to see whether the above statement is trustable. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - + @@ -1837,7 +1879,7 @@ - + @@ -2743,24 +2785,5 @@ Features listed here may not work as expected. - - - - - - - - - - - - - - - - - - -