From 21b231c3927ba2f683f0313b5f77f69928f26549 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 6 Dec 2022 15:32:05 +0800 Subject: [PATCH] PrefUI // Disable Windows Aero glass effect. - This causes legibility issues with grey texts shown in textField, hence the removal of it. --- .../Source/SSPreferences/PreferencesTabViewController.swift | 6 +----- Source/Modules/UIModules/PrefUI/VwrPrefPaneCassette.swift | 1 - Source/Modules/UIModules/PrefUI/VwrPrefPaneDevZone.swift | 1 - Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift | 1 - Source/Modules/UIModules/PrefUI/VwrPrefPaneExperience.swift | 1 - Source/Modules/UIModules/PrefUI/VwrPrefPaneGeneral.swift | 1 - Source/Modules/UIModules/PrefUI/VwrPrefPaneKeyboard.swift | 1 - Source/Modules/UIModules/PrefUI/VwrPrefPanePhrases.swift | 1 - 8 files changed, 1 insertion(+), 12 deletions(-) diff --git a/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/PreferencesTabViewController.swift b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/PreferencesTabViewController.swift index 3d3361ad..92e60b03 100755 --- a/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/PreferencesTabViewController.swift +++ b/Packages/Sindresorhus_SSPreferences/Source/SSPreferences/PreferencesTabViewController.swift @@ -29,11 +29,7 @@ final class PreferencesTabViewController: NSViewController, PreferencesStyleCont } override func loadView() { - let newView = NSVisualEffectView() - newView.material = NSVisualEffectView.Material.sidebar - newView.blendingMode = NSVisualEffectView.BlendingMode.behindWindow - newView.state = NSVisualEffectView.State.active - view = newView + view = NSView() view.translatesAutoresizingMaskIntoConstraints = false } diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneCassette.swift b/Source/Modules/UIModules/PrefUI/VwrPrefPaneCassette.swift index 10395369..7fe2787f 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneCassette.swift +++ b/Source/Modules/UIModules/PrefUI/VwrPrefPaneCassette.swift @@ -177,7 +177,6 @@ struct VwrPrefPaneCassette: View { } } .frame(maxHeight: contentMaxHeight).fixedSize(horizontal: false, vertical: true) - .background(VisualEffectView(material: .sidebar, blendingMode: .behindWindow)) } } diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneDevZone.swift b/Source/Modules/UIModules/PrefUI/VwrPrefPaneDevZone.swift index f6d5d85f..d6541897 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneDevZone.swift +++ b/Source/Modules/UIModules/PrefUI/VwrPrefPaneDevZone.swift @@ -118,7 +118,6 @@ struct VwrPrefPaneDevZone: View { } } .frame(maxHeight: contentMaxHeight).fixedSize(horizontal: false, vertical: true) - .background(VisualEffectView(material: .sidebar, blendingMode: .behindWindow)) } } diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift b/Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift index 90756057..72b9a0dc 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift +++ b/Source/Modules/UIModules/PrefUI/VwrPrefPaneDictionary.swift @@ -194,7 +194,6 @@ struct VwrPrefPaneDictionary: View { } } .frame(maxHeight: contentMaxHeight).fixedSize(horizontal: false, vertical: true) - .background(VisualEffectView(material: .sidebar, blendingMode: .behindWindow)) } } diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneExperience.swift b/Source/Modules/UIModules/PrefUI/VwrPrefPaneExperience.swift index a3ee34bd..f90bbc55 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneExperience.swift +++ b/Source/Modules/UIModules/PrefUI/VwrPrefPaneExperience.swift @@ -281,7 +281,6 @@ struct VwrPrefPaneExperience: View { } } .frame(maxHeight: contentMaxHeight).fixedSize(horizontal: false, vertical: true) - .background(VisualEffectView(material: .sidebar, blendingMode: .behindWindow)) } } diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneGeneral.swift b/Source/Modules/UIModules/PrefUI/VwrPrefPaneGeneral.swift index 640c3c56..5149f3bb 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneGeneral.swift +++ b/Source/Modules/UIModules/PrefUI/VwrPrefPaneGeneral.swift @@ -195,7 +195,6 @@ struct VwrPrefPaneGeneral: View { } } .frame(maxHeight: contentMaxHeight).fixedSize(horizontal: false, vertical: true) - .background(VisualEffectView(material: .sidebar, blendingMode: .behindWindow)) } } diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneKeyboard.swift b/Source/Modules/UIModules/PrefUI/VwrPrefPaneKeyboard.swift index 0cfccea5..7fbb2491 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneKeyboard.swift +++ b/Source/Modules/UIModules/PrefUI/VwrPrefPaneKeyboard.swift @@ -154,7 +154,6 @@ struct VwrPrefPaneKeyboard: View { } } .frame(maxHeight: contentMaxHeight).fixedSize(horizontal: false, vertical: true) - .background(VisualEffectView(material: .sidebar, blendingMode: .behindWindow)) } } diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPanePhrases.swift b/Source/Modules/UIModules/PrefUI/VwrPrefPanePhrases.swift index 3782560b..1e4d2d97 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPanePhrases.swift +++ b/Source/Modules/UIModules/PrefUI/VwrPrefPanePhrases.swift @@ -44,7 +44,6 @@ struct VwrPrefPanePhrases: View { } } .frame(maxHeight: contentMaxHeight).fixedSize(horizontal: false, vertical: true) - .background(VisualEffectView(material: .sidebar, blendingMode: .behindWindow)) } }