From 2aa54018a079ba65ec9d6fbfdb7df017d3d8bd09 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Wed, 2 Mar 2022 01:44:10 +0800 Subject: [PATCH] Voltaire // Disable Rounded Window Corner on macOS 10.11-12. - macOS 10.11 cannot always render rounded window corner correctly. - macOS 10.12 users are strongly suggested to upgrade to at least macOS 10.13, especially Hackintosh users for better NVMe support. TBO vChewing is considering of removing macOS 10.12 from the supported OS list. --- Source/UI/CandidateUI/HorizontalCandidateController.swift | 4 +++- Source/UI/CandidateUI/VerticalCandidateController.swift | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/UI/CandidateUI/HorizontalCandidateController.swift b/Source/UI/CandidateUI/HorizontalCandidateController.swift index c120d8eb..a2e0785c 100644 --- a/Source/UI/CandidateUI/HorizontalCandidateController.swift +++ b/Source/UI/CandidateUI/HorizontalCandidateController.swift @@ -105,7 +105,9 @@ fileprivate class HorizontalCandidateView: NSView { self.wantsLayer = true self.layer?.borderColor = NSColor.selectedMenuItemTextColor.withAlphaComponent(0.30).cgColor self.layer?.borderWidth = 1.0 - self.layer?.cornerRadius = 6.0 + if #available(macOS 10.13, *) { + self.layer?.cornerRadius = 6.0 + } let bounds = self.bounds NSColor.controlBackgroundColor.setFill() // Candidate list panel base background diff --git a/Source/UI/CandidateUI/VerticalCandidateController.swift b/Source/UI/CandidateUI/VerticalCandidateController.swift index 69bf624b..35055ba7 100644 --- a/Source/UI/CandidateUI/VerticalCandidateController.swift +++ b/Source/UI/CandidateUI/VerticalCandidateController.swift @@ -111,7 +111,9 @@ fileprivate class VerticalCandidateView: NSView { self.wantsLayer = true self.layer?.borderColor = NSColor.selectedMenuItemTextColor.withAlphaComponent(0.30).cgColor self.layer?.borderWidth = 1.0 - self.layer?.cornerRadius = 6.0 + if #available(macOS 10.13, *) { + self.layer?.cornerRadius = 6.0 + } let bounds = self.bounds NSColor.controlBackgroundColor.setFill() // Candidate list panel base background