From 837e5058ff110247229057f7ab182a041d1c98b8 Mon Sep 17 00:00:00 2001 From: der richter Date: Fri, 29 Mar 2019 20:38:02 +0100 Subject: cocoa-cb: refactor title bar styling half of the materials we used were deprecated with macOS 10.14, broken and not supported by run time changes of the macOS theme. furthermore our styling names were completely inconsistent with the actually look since macOS 10.14, eg ultradark got a lot brighter and couldn't be considered ultradark anymore. i decided to drop the old option --macos-title-bar-style and rework the whole mechanism to allow more freedom. now materials and appearance can be set separately. even if apple changes the look or semantics in the future the new options can be easily adapted. --- video/out/cocoa_cb_common.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'video/out/cocoa_cb_common.swift') diff --git a/video/out/cocoa_cb_common.swift b/video/out/cocoa_cb_common.swift index cf714bfa4d..a3fabd0324 100644 --- a/video/out/cocoa_cb_common.swift +++ b/video/out/cocoa_cb_common.swift @@ -513,9 +513,13 @@ class CocoaCB: NSObject { if let data = MPVHelper.mpvFlagToBool(property.data) { window.keepAspect = data } - case "macos-title-bar-style": + case "macos-title-bar-appearance": if let data = MPVHelper.mpvStringArrayToString(property.data) { - titleBar.setStyle(data) + titleBar.set(appearance: data) + } + case "macos-title-bar-material": + if let data = MPVHelper.mpvStringArrayToString(property.data) { + titleBar.set(material: data) } default: break -- cgit v1.2.3