From 4370456323f90e19fcebb7ab04eb979972f3c9b8 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 12 Jul 2021 21:28:04 -0400 Subject: [PATCH] Switch to an NSVisualEffectView for volume controls. It provides a background that better contrasts with arbitrary content. --- .../Base.lproj/MachineDocument.xib | 90 +++++++++---------- .../Documents/MachineDocument.swift | 5 +- 2 files changed, 45 insertions(+), 50 deletions(-) diff --git a/OSBindings/Mac/Clock Signal/Base.lproj/MachineDocument.xib b/OSBindings/Mac/Clock Signal/Base.lproj/MachineDocument.xib index 3c027d956..af426a87c 100644 --- a/OSBindings/Mac/Clock Signal/Base.lproj/MachineDocument.xib +++ b/OSBindings/Mac/Clock Signal/Base.lproj/MachineDocument.xib @@ -9,8 +9,8 @@ - - + + @@ -30,58 +30,50 @@ - + + - - + diff --git a/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift b/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift index e2a0bc7c9..945c9ad21 100644 --- a/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift +++ b/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift @@ -63,7 +63,7 @@ class MachineDocument: } /// The volume view. - @IBOutlet var volumeView: NSBox! + @IBOutlet var volumeView: NSView! @IBOutlet var volumeSlider: NSSlider! // MARK: - NSDocument Overrides and NSWindowDelegate methods. @@ -135,6 +135,9 @@ class MachineDocument: super.windowControllerDidLoadNib(aController) aController.window?.contentAspectRatio = self.aspectRatio() volumeSlider.floatValue = userDefaultsVolume() + + volumeView.wantsLayer = true + volumeView.layer?.cornerRadius = 5.0 } private var missingROMs: String = ""