mirror of
https://github.com/danbee/persephone
synced 2025-03-04 08:39:11 +00:00
WIP
This commit is contained in:
parent
deb34d6c3d
commit
ffd1f3f83a
@ -7,26 +7,24 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import AppKit
|
import AppKit
|
||||||
|
import ReSwift
|
||||||
|
|
||||||
class BrowseController: NSViewController {
|
class BrowseController: NSViewController {
|
||||||
@IBOutlet var artistsButton: NSButton!
|
|
||||||
@IBOutlet var albumsButton: NSButton!
|
|
||||||
|
|
||||||
@IBOutlet var browseTabView: NSTabView!
|
@IBOutlet var browseTabView: NSTabView!
|
||||||
|
|
||||||
@IBAction func switchToTab(_ sender: NSButton) {
|
override func viewDidLoad() {
|
||||||
artistsButton.state = .off
|
super.viewDidLoad()
|
||||||
albumsButton.state = .off
|
|
||||||
|
|
||||||
switch sender.identifier?.rawValue {
|
App.store.subscribe(self) {
|
||||||
case "artists":
|
$0.select { $0.uiState }
|
||||||
artistsButton.state = .on
|
|
||||||
browseTabView.selectTabViewItem(at: 0)
|
|
||||||
case "albums":
|
|
||||||
albumsButton.state = .on
|
|
||||||
browseTabView.selectTabViewItem(at: 1)
|
|
||||||
default:
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension BrowseController: StoreSubscriber {
|
||||||
|
typealias BrowseSubscriberStateType = UIState
|
||||||
|
|
||||||
|
func newState(state: BrowseSubscriberStateType) {
|
||||||
|
browseTabView.selectTabViewItem(at: state.browseViewState.rawValue)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -27,6 +27,8 @@ class WindowController: NSWindowController {
|
|||||||
@IBOutlet var shuffleState: NSButton!
|
@IBOutlet var shuffleState: NSButton!
|
||||||
@IBOutlet var repeatState: NSButton!
|
@IBOutlet var repeatState: NSButton!
|
||||||
|
|
||||||
|
@IBOutlet var browseViewControls: NSSegmentedControl!
|
||||||
|
|
||||||
override func windowDidLoad() {
|
override func windowDidLoad() {
|
||||||
super.windowDidLoad()
|
super.windowDidLoad()
|
||||||
window?.titleVisibility = .hidden
|
window?.titleVisibility = .hidden
|
||||||
@ -38,6 +40,8 @@ class WindowController: NSWindowController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
browseViewControls.setSelected(true, forSegment: App.store.state.uiState.browseViewState.rawValue)
|
||||||
|
|
||||||
App.store.dispatch(MainWindowDidOpenAction())
|
App.store.dispatch(MainWindowDidOpenAction())
|
||||||
|
|
||||||
trackProgress.font = .timerFont
|
trackProgress.font = .timerFont
|
||||||
@ -160,6 +164,12 @@ class WindowController: NSWindowController {
|
|||||||
App.mpdClient.setRepeatState(repeatState: sender.state == .on)
|
App.mpdClient.setRepeatState(repeatState: sender.state == .on)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@IBAction func setBrowseViewState(_ sender: NSSegmentedControl) {
|
||||||
|
guard let browseViewState = BrowseViewState(rawValue: sender.selectedSegment)
|
||||||
|
else { return }
|
||||||
|
|
||||||
|
App.store.dispatch(SetVisibleBrowseView(browseViewState: browseViewState))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension WindowController: NSWindowDelegate {
|
extension WindowController: NSWindowDelegate {
|
||||||
|
|||||||
@ -302,6 +302,23 @@
|
|||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
</toolbarItem>
|
</toolbarItem>
|
||||||
|
<toolbarItem implicitItemIdentifier="D1F09BC1-069E-4734-AFB1-C8E4542D0F75" label="Browse View" paletteLabel="Browse View" sizingBehavior="auto" id="CDA-Tu-0RJ">
|
||||||
|
<nil key="toolTip"/>
|
||||||
|
<segmentedControl key="view" verticalHuggingPriority="750" id="F8b-3l-HcP">
|
||||||
|
<rect key="frame" x="0.0" y="14" width="141" height="24"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
|
<segmentedCell key="cell" borderStyle="border" alignment="left" style="texturedSquare" trackingMode="selectOne" id="iXx-16-jmI">
|
||||||
|
<font key="font" metaFont="system"/>
|
||||||
|
<segments>
|
||||||
|
<segment label="Artists"/>
|
||||||
|
<segment label="Albums"/>
|
||||||
|
</segments>
|
||||||
|
</segmentedCell>
|
||||||
|
<connections>
|
||||||
|
<action selector="setBrowseViewState:" target="B8D-0N-5wS" id="fVP-WG-uOi"/>
|
||||||
|
</connections>
|
||||||
|
</segmentedControl>
|
||||||
|
</toolbarItem>
|
||||||
</allowedToolbarItems>
|
</allowedToolbarItems>
|
||||||
<defaultToolbarItems>
|
<defaultToolbarItems>
|
||||||
<toolbarItem reference="p3r-ty-Pxf"/>
|
<toolbarItem reference="p3r-ty-Pxf"/>
|
||||||
@ -314,6 +331,7 @@
|
|||||||
<toolbarItem reference="s1h-EC-nvL"/>
|
<toolbarItem reference="s1h-EC-nvL"/>
|
||||||
<toolbarItem reference="5U7-UV-xn2"/>
|
<toolbarItem reference="5U7-UV-xn2"/>
|
||||||
<toolbarItem reference="9ol-aR-mzv"/>
|
<toolbarItem reference="9ol-aR-mzv"/>
|
||||||
|
<toolbarItem reference="CDA-Tu-0RJ"/>
|
||||||
</defaultToolbarItems>
|
</defaultToolbarItems>
|
||||||
</toolbar>
|
</toolbar>
|
||||||
<connections>
|
<connections>
|
||||||
@ -321,6 +339,8 @@
|
|||||||
</connections>
|
</connections>
|
||||||
</window>
|
</window>
|
||||||
<connections>
|
<connections>
|
||||||
|
<outlet property="browseViewControl" destination="F8b-3l-HcP" id="a4B-dd-NDE"/>
|
||||||
|
<outlet property="browseViewControls" destination="F8b-3l-HcP" id="AMQ-6B-8Zd"/>
|
||||||
<outlet property="databaseUpdatingIndicator" destination="LpV-iM-o6t" id="y0T-eR-ygY"/>
|
<outlet property="databaseUpdatingIndicator" destination="LpV-iM-o6t" id="y0T-eR-ygY"/>
|
||||||
<outlet property="repeatState" destination="OqH-lV-sAg" id="DPC-Ff-Srr"/>
|
<outlet property="repeatState" destination="OqH-lV-sAg" id="DPC-Ff-Srr"/>
|
||||||
<outlet property="shuffleState" destination="E8L-uK-XT0" id="dCF-hm-dBs"/>
|
<outlet property="shuffleState" destination="E8L-uK-XT0" id="dCF-hm-dBs"/>
|
||||||
@ -505,123 +525,64 @@
|
|||||||
<objects>
|
<objects>
|
||||||
<viewController id="SjO-VS-1bb" customClass="BrowseController" customModule="Persephone" customModuleProvider="target" sceneMemberID="viewController">
|
<viewController id="SjO-VS-1bb" customClass="BrowseController" customModule="Persephone" customModuleProvider="target" sceneMemberID="viewController">
|
||||||
<view key="view" id="BRY-0R-F3u">
|
<view key="view" id="BRY-0R-F3u">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="478" height="536"/>
|
<rect key="frame" x="0.0" y="0.0" width="478" height="558"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<stackView distribution="fill" orientation="vertical" alignment="centerX" spacing="2" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="35G-X1-hrz">
|
<tabView type="noTabsNoBorder" initialItem="XgS-cX-SDH" translatesAutoresizingMaskIntoConstraints="NO" id="ARv-cj-xlz">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="478" height="536"/>
|
<rect key="frame" x="0.0" y="0.0" width="478" height="558"/>
|
||||||
<subviews>
|
<font key="font" metaFont="system"/>
|
||||||
<stackView distribution="equalCentering" orientation="horizontal" alignment="centerY" spacing="2" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="LBv-o9-2Ya">
|
<tabViewItems>
|
||||||
<rect key="frame" x="181" y="498" width="116" height="38"/>
|
<tabViewItem label="Artists" identifier="" id="bV1-g9-37C">
|
||||||
<subviews>
|
<view key="view" id="5Ye-bM-Ifl">
|
||||||
<button identifier="artists" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="SFs-nF-qQx" customClass="BrowseViewButton" customModule="Persephone" customModuleProvider="target">
|
<rect key="frame" x="0.0" y="0.0" width="478" height="558"/>
|
||||||
<rect key="frame" x="0.0" y="9" width="54" height="19"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<buttonCell key="cell" type="recessed" title="Artists" bezelStyle="recessed" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="wYx-jY-G52">
|
<subviews>
|
||||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
|
<containerView translatesAutoresizingMaskIntoConstraints="NO" id="EBh-Di-UhX">
|
||||||
<font key="font" metaFont="system"/>
|
<rect key="frame" x="0.0" y="0.0" width="478" height="558"/>
|
||||||
</buttonCell>
|
<connections>
|
||||||
<connections>
|
<segue destination="LpS-90-tby" kind="embed" id="00m-3s-fzb"/>
|
||||||
<action selector="switchToTab:" target="SjO-VS-1bb" id="wPl-Ga-LZU"/>
|
</connections>
|
||||||
</connections>
|
</containerView>
|
||||||
</button>
|
</subviews>
|
||||||
<button identifier="albums" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="OnP-F2-wY0" customClass="BrowseViewButton" customModule="Persephone" customModuleProvider="target">
|
<constraints>
|
||||||
<rect key="frame" x="56" y="9" width="60" height="19"/>
|
<constraint firstItem="EBh-Di-UhX" firstAttribute="leading" secondItem="5Ye-bM-Ifl" secondAttribute="leading" id="SR7-0Y-U4Q"/>
|
||||||
<buttonCell key="cell" type="recessed" title="Albums" bezelStyle="recessed" alignment="center" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="7XB-MN-6Ms">
|
<constraint firstItem="EBh-Di-UhX" firstAttribute="top" secondItem="5Ye-bM-Ifl" secondAttribute="top" id="bcN-6r-OFW"/>
|
||||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
|
<constraint firstAttribute="bottom" secondItem="EBh-Di-UhX" secondAttribute="bottom" id="kOK-UG-b31"/>
|
||||||
<font key="font" metaFont="system"/>
|
<constraint firstAttribute="trailing" secondItem="EBh-Di-UhX" secondAttribute="trailing" id="vB5-SX-6iT"/>
|
||||||
</buttonCell>
|
</constraints>
|
||||||
<connections>
|
</view>
|
||||||
<action selector="switchToTab:" target="SjO-VS-1bb" id="rql-oa-9AB"/>
|
</tabViewItem>
|
||||||
</connections>
|
<tabViewItem label="Albums" identifier="" id="XgS-cX-SDH">
|
||||||
</button>
|
<view key="view" id="hB7-hN-SbB">
|
||||||
</subviews>
|
<rect key="frame" x="0.0" y="0.0" width="478" height="558"/>
|
||||||
<edgeInsets key="edgeInsets" left="0.0" right="0.0" top="8" bottom="8"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<constraints>
|
<subviews>
|
||||||
<constraint firstItem="OnP-F2-wY0" firstAttribute="top" secondItem="LBv-o9-2Ya" secondAttribute="top" constant="10" id="6XX-6Q-E1u"/>
|
<containerView translatesAutoresizingMaskIntoConstraints="NO" id="moE-bb-Zvg">
|
||||||
<constraint firstItem="OnP-F2-wY0" firstAttribute="leading" secondItem="SFs-nF-qQx" secondAttribute="trailing" constant="2" id="tBi-h3-VCC"/>
|
<rect key="frame" x="-3" y="-3" width="481" height="561"/>
|
||||||
</constraints>
|
<connections>
|
||||||
<visibilityPriorities>
|
<segue destination="gPn-fP-LFc" kind="embed" id="2iB-9y-I9h"/>
|
||||||
<integer value="1000"/>
|
</connections>
|
||||||
<integer value="1000"/>
|
</containerView>
|
||||||
</visibilityPriorities>
|
</subviews>
|
||||||
<customSpacing>
|
<constraints>
|
||||||
<real value="3.4028234663852886e+38"/>
|
<constraint firstItem="moE-bb-Zvg" firstAttribute="top" secondItem="hB7-hN-SbB" secondAttribute="top" id="DUI-jy-8D7"/>
|
||||||
<real value="3.4028234663852886e+38"/>
|
<constraint firstItem="moE-bb-Zvg" firstAttribute="leading" secondItem="hB7-hN-SbB" secondAttribute="leading" constant="-3" id="dCS-Kx-2UP"/>
|
||||||
</customSpacing>
|
<constraint firstAttribute="trailing" secondItem="moE-bb-Zvg" secondAttribute="trailing" id="qey-4e-xfu"/>
|
||||||
</stackView>
|
<constraint firstAttribute="bottom" secondItem="moE-bb-Zvg" secondAttribute="bottom" constant="-3" id="ziA-Xh-dlz"/>
|
||||||
<tabView type="noTabsNoBorder" initialItem="XgS-cX-SDH" translatesAutoresizingMaskIntoConstraints="NO" id="ARv-cj-xlz">
|
</constraints>
|
||||||
<rect key="frame" x="0.0" y="0.0" width="478" height="496"/>
|
</view>
|
||||||
<font key="font" metaFont="system"/>
|
</tabViewItem>
|
||||||
<tabViewItems>
|
</tabViewItems>
|
||||||
<tabViewItem label="Artists" identifier="" id="bV1-g9-37C">
|
</tabView>
|
||||||
<view key="view" id="5Ye-bM-Ifl">
|
|
||||||
<rect key="frame" x="0.0" y="0.0" width="478" height="496"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
||||||
<subviews>
|
|
||||||
<containerView translatesAutoresizingMaskIntoConstraints="NO" id="EBh-Di-UhX">
|
|
||||||
<rect key="frame" x="0.0" y="0.0" width="478" height="496"/>
|
|
||||||
<connections>
|
|
||||||
<segue destination="LpS-90-tby" kind="embed" id="00m-3s-fzb"/>
|
|
||||||
</connections>
|
|
||||||
</containerView>
|
|
||||||
</subviews>
|
|
||||||
<constraints>
|
|
||||||
<constraint firstItem="EBh-Di-UhX" firstAttribute="leading" secondItem="5Ye-bM-Ifl" secondAttribute="leading" id="SR7-0Y-U4Q"/>
|
|
||||||
<constraint firstItem="EBh-Di-UhX" firstAttribute="top" secondItem="5Ye-bM-Ifl" secondAttribute="top" id="bcN-6r-OFW"/>
|
|
||||||
<constraint firstAttribute="bottom" secondItem="EBh-Di-UhX" secondAttribute="bottom" id="kOK-UG-b31"/>
|
|
||||||
<constraint firstAttribute="trailing" secondItem="EBh-Di-UhX" secondAttribute="trailing" id="vB5-SX-6iT"/>
|
|
||||||
</constraints>
|
|
||||||
</view>
|
|
||||||
</tabViewItem>
|
|
||||||
<tabViewItem label="Albums" identifier="" id="XgS-cX-SDH">
|
|
||||||
<view key="view" id="hB7-hN-SbB">
|
|
||||||
<rect key="frame" x="0.0" y="0.0" width="478" height="496"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
||||||
<subviews>
|
|
||||||
<containerView translatesAutoresizingMaskIntoConstraints="NO" id="moE-bb-Zvg">
|
|
||||||
<rect key="frame" x="-3" y="-3" width="481" height="499"/>
|
|
||||||
<connections>
|
|
||||||
<segue destination="gPn-fP-LFc" kind="embed" id="2iB-9y-I9h"/>
|
|
||||||
</connections>
|
|
||||||
</containerView>
|
|
||||||
</subviews>
|
|
||||||
<constraints>
|
|
||||||
<constraint firstItem="moE-bb-Zvg" firstAttribute="top" secondItem="hB7-hN-SbB" secondAttribute="top" id="DUI-jy-8D7"/>
|
|
||||||
<constraint firstItem="moE-bb-Zvg" firstAttribute="leading" secondItem="hB7-hN-SbB" secondAttribute="leading" constant="-3" id="dCS-Kx-2UP"/>
|
|
||||||
<constraint firstAttribute="trailing" secondItem="moE-bb-Zvg" secondAttribute="trailing" id="qey-4e-xfu"/>
|
|
||||||
<constraint firstAttribute="bottom" secondItem="moE-bb-Zvg" secondAttribute="bottom" constant="-3" id="ziA-Xh-dlz"/>
|
|
||||||
</constraints>
|
|
||||||
</view>
|
|
||||||
</tabViewItem>
|
|
||||||
</tabViewItems>
|
|
||||||
</tabView>
|
|
||||||
</subviews>
|
|
||||||
<constraints>
|
|
||||||
<constraint firstAttribute="trailing" secondItem="ARv-cj-xlz" secondAttribute="trailing" id="4XJ-un-DRm"/>
|
|
||||||
<constraint firstItem="LBv-o9-2Ya" firstAttribute="top" secondItem="35G-X1-hrz" secondAttribute="top" id="wk2-ZY-TMz"/>
|
|
||||||
<constraint firstItem="LBv-o9-2Ya" firstAttribute="centerX" secondItem="35G-X1-hrz" secondAttribute="centerX" id="xAR-qw-hiL"/>
|
|
||||||
<constraint firstItem="ARv-cj-xlz" firstAttribute="leading" secondItem="35G-X1-hrz" secondAttribute="leading" id="yL8-Gq-8bT"/>
|
|
||||||
</constraints>
|
|
||||||
<visibilityPriorities>
|
|
||||||
<integer value="1000"/>
|
|
||||||
<integer value="1000"/>
|
|
||||||
</visibilityPriorities>
|
|
||||||
<customSpacing>
|
|
||||||
<real value="3.4028234663852886e+38"/>
|
|
||||||
<real value="3.4028234663852886e+38"/>
|
|
||||||
</customSpacing>
|
|
||||||
</stackView>
|
|
||||||
</subviews>
|
</subviews>
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstAttribute="trailing" secondItem="35G-X1-hrz" secondAttribute="trailing" id="GmC-07-TZ9"/>
|
<constraint firstAttribute="trailing" secondItem="ARv-cj-xlz" secondAttribute="trailing" id="nXk-bi-ua4"/>
|
||||||
<constraint firstAttribute="bottom" secondItem="35G-X1-hrz" secondAttribute="bottom" id="QLO-5f-nea"/>
|
<constraint firstAttribute="bottom" secondItem="ARv-cj-xlz" secondAttribute="bottom" id="nzf-Jw-Bpk"/>
|
||||||
<constraint firstItem="35G-X1-hrz" firstAttribute="leading" secondItem="BRY-0R-F3u" secondAttribute="leading" id="T5b-dY-ac0"/>
|
<constraint firstItem="ARv-cj-xlz" firstAttribute="top" secondItem="BRY-0R-F3u" secondAttribute="top" id="v6W-0L-kQ1"/>
|
||||||
<constraint firstItem="35G-X1-hrz" firstAttribute="top" secondItem="BRY-0R-F3u" secondAttribute="top" id="dCC-1m-Dc6"/>
|
<constraint firstItem="ARv-cj-xlz" firstAttribute="leading" secondItem="BRY-0R-F3u" secondAttribute="leading" id="w2Z-xv-Fwz"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
</view>
|
</view>
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="albumsButton" destination="OnP-F2-wY0" id="Ft9-h6-5MU"/>
|
|
||||||
<outlet property="artistsButton" destination="SFs-nF-qQx" id="Khk-Wu-ZIs"/>
|
|
||||||
<outlet property="browseTabView" destination="ARv-cj-xlz" id="h93-fi-yY7"/>
|
<outlet property="browseTabView" destination="ARv-cj-xlz" id="h93-fi-yY7"/>
|
||||||
</connections>
|
</connections>
|
||||||
</viewController>
|
</viewController>
|
||||||
|
|||||||
@ -18,6 +18,10 @@ struct DatabaseUpdateStartedAction: Action {}
|
|||||||
|
|
||||||
struct DatabaseUpdateFinishedAction: Action {}
|
struct DatabaseUpdateFinishedAction: Action {}
|
||||||
|
|
||||||
|
struct SetVisibleBrowseView: Action {
|
||||||
|
let browseViewState: BrowseViewState
|
||||||
|
}
|
||||||
|
|
||||||
struct SetSelectedQueueItem: Action {
|
struct SetSelectedQueueItem: Action {
|
||||||
let selectedQueueItem: QueueItem?
|
let selectedQueueItem: QueueItem?
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,6 +27,9 @@ func uiReducer(action: Action, state: UIState?) -> UIState {
|
|||||||
case is DatabaseUpdateFinishedAction:
|
case is DatabaseUpdateFinishedAction:
|
||||||
state.databaseUpdating = false
|
state.databaseUpdating = false
|
||||||
|
|
||||||
|
case let action as SetVisibleBrowseView:
|
||||||
|
state.browseViewState = action.browseViewState
|
||||||
|
|
||||||
case let action as SetSelectedSong:
|
case let action as SetSelectedSong:
|
||||||
state.selectedSong = action.selectedSong
|
state.selectedSong = action.selectedSong
|
||||||
|
|
||||||
|
|||||||
@ -14,8 +14,14 @@ enum MainWindowState {
|
|||||||
case minimised
|
case minimised
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum BrowseViewState: Int {
|
||||||
|
case artists = 0
|
||||||
|
case albums = 1
|
||||||
|
}
|
||||||
|
|
||||||
struct UIState: StateType {
|
struct UIState: StateType {
|
||||||
var mainWindowState: MainWindowState = .closed
|
var mainWindowState: MainWindowState = .closed
|
||||||
|
var browseViewState: BrowseViewState = .albums
|
||||||
|
|
||||||
var databaseUpdating: Bool = false
|
var databaseUpdating: Bool = false
|
||||||
|
|
||||||
|
|||||||
@ -14,10 +14,5 @@ class BrowseViewButton: NSButton {
|
|||||||
// Drawing code here.
|
// Drawing code here.
|
||||||
self.layer?.cornerRadius = 4
|
self.layer?.cornerRadius = 4
|
||||||
self.layer?.masksToBounds = true
|
self.layer?.masksToBounds = true
|
||||||
if #available(OSX 10.14, *) {
|
|
||||||
self.layer?.backgroundColor = NSColor.controlAccentColor.cgColor
|
|
||||||
} else {
|
|
||||||
// Fallback on earlier versions
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user