summaryrefslogtreecommitdiffstats
path: root/video/out/cocoa_cb_common.swift
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2019-03-29 20:38:02 +0100
committerJan Ekström <jeebjp@gmail.com>2019-04-02 02:09:01 +0300
commit837e5058ff110247229057f7ab182a041d1c98b8 (patch)
tree5946977ba0e69eede15d6a2e988dae2ac728876f /video/out/cocoa_cb_common.swift
parent23f55569beda4ed53e4d85a12769ef41f05f96ca (diff)
downloadmpv-837e5058ff110247229057f7ab182a041d1c98b8.tar.bz2
mpv-837e5058ff110247229057f7ab182a041d1c98b8.tar.xz
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.
Diffstat (limited to 'video/out/cocoa_cb_common.swift')
-rw-r--r--video/out/cocoa_cb_common.swift8
1 files changed, 6 insertions, 2 deletions
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