Browse Source

Changing checks from macOS 10.16 to OSX 11.0

pull/92/head
Abhishek 4 years ago
parent
commit
f05646751a
  1. 2
      Clocker/Menu Bar/StatusContainerView.swift
  2. 4
      Clocker/Menu Bar/StatusItemView.swift
  3. 55
      Clocker/Onboarding/Onboarding.storyboard
  4. 6
      Clocker/Onboarding/OnboardingParentViewController.swift
  5. 11
      Clocker/Onboarding/OnboardingSearchController.swift
  6. 2
      Clocker/Panel/Notes Popover/NotesPopover.swift
  7. 2
      Clocker/Panel/ParentPanelController.swift
  8. 2
      Clocker/Panel/UI/TimezoneDataSource.swift

2
Clocker/Menu Bar/StatusContainerView.swift

@ -122,7 +122,7 @@ class StatusContainerView: NSView {
private func bestWidth(for timezone: TimezoneData) -> Int {
var textColor = hasDarkAppearance ? NSColor.white : NSColor.black
if #available(macOS 10.16, *) {
if #available(OSX 11.0, *) {
textColor = NSColor.white
}

4
Clocker/Menu Bar/StatusItemView.swift

@ -45,7 +45,7 @@ class StatusItemView: NSView {
private var timeAttributes: [NSAttributedString.Key: AnyObject] {
var textColor = hasDarkAppearance ? NSColor.white : NSColor.black
if #available(macOS 10.16, *) {
if #available(OSX 11.0, *) {
textColor = NSColor.white
}
@ -61,7 +61,7 @@ class StatusItemView: NSView {
private var textFontAttributes: [NSAttributedString.Key: Any] {
var textColor = hasDarkAppearance ? NSColor.white : NSColor.black
if #available(macOS 10.16, *) {
if #available(OSX 11.0, *) {
textColor = NSColor.white
}

55
Clocker/Onboarding/Onboarding.storyboard

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="16097" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="fde-UX-327">
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="17154" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="fde-UX-327">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16097"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17154"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
@ -46,7 +46,7 @@
</constraints>
</containerView>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="m1D-bY-RlD">
<rect key="frame" x="367" y="13" width="95" height="32"/>
<rect key="frame" x="362" y="13" width="101" height="32"/>
<buttonCell key="cell" type="push" title="Continue" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="5qt-i6-wXk">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
@ -59,7 +59,7 @@ DQ
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="kbp-ED-vvP">
<rect key="frame" x="14" y="-1" width="62" height="61"/>
<rect key="frame" x="13" y="-2" width="64" height="62"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="nfD-s1-MfF"/>
<constraint firstAttribute="width" constant="50" id="opl-FH-00w"/>
@ -73,7 +73,7 @@ DQ
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="W3z-nZ-e6B">
<rect key="frame" x="258" y="13" width="109" height="32"/>
<rect key="frame" x="248" y="13" width="116" height="32"/>
<buttonCell key="cell" type="push" title="Don't Open" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="tPS-m0-NWm">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
@ -187,7 +187,7 @@ DQ
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="O0s-Bu-IPq">
<rect key="frame" x="303" y="62" width="79" height="32"/>
<rect key="frame" x="298" y="62" width="85" height="32"/>
<buttonCell key="cell" type="push" title="Action" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="BW3-qu-NiR">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
@ -205,7 +205,7 @@ DQ
</textFieldCell>
</textField>
<progressIndicator wantsLayer="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" displayedWhenStopped="NO" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="Zhi-9z-C2u">
<rect key="frame" x="253" y="71" width="16" height="16"/>
<rect key="frame" x="249" y="71" width="16" height="16"/>
</progressIndicator>
</subviews>
<constraints>
@ -250,7 +250,7 @@ DQ
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="dI2-oA-MBA">
<rect key="frame" x="303" y="52" width="79" height="32"/>
<rect key="frame" x="298" y="52" width="85" height="32"/>
<buttonCell key="cell" type="push" title="Action" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="i5r-db-Pnw">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
@ -260,7 +260,7 @@ DQ
</connections>
</button>
<progressIndicator wantsLayer="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" displayedWhenStopped="NO" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="0GH-vY-2Du">
<rect key="frame" x="253" y="61" width="16" height="16"/>
<rect key="frame" x="249" y="61" width="16" height="16"/>
</progressIndicator>
</subviews>
<constraints>
@ -457,7 +457,7 @@ DQ
<constraints>
<constraint firstAttribute="height" constant="22" id="7wX-F5-PaV"/>
</constraints>
<searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" usesSingleLineMode="YES" bezelStyle="round" id="VA8-gb-SS5">
<searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" usesSingleLineMode="YES" bezelStyle="round" id="VA8-gb-SS5">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
@ -553,16 +553,11 @@ DQ
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="wDx-nO-z0M">
<rect key="frame" x="20" y="29" width="4" height="18"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" id="c1w-j2-JT6">
<font key="font" size="13" name="Avenir-Book"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="51r-DX-fZU">
<rect key="frame" x="22" y="30" width="423" height="16"/>
<stackView distribution="fill" orientation="horizontal" alignment="top" spacing="0.0" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" fixedFrame="YES" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="19u-fb-YoO">
<rect key="frame" x="22" y="29" width="91" height="18"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="51r-DX-fZU">
<rect key="frame" x="0.0" y="2" width="41" height="16"/>
<buttonCell key="cell" type="bevel" title="UNDO" bezelStyle="rounded" alignment="left" imageScaling="proportionallyDown" inset="2" id="h5W-mQ-yIP">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" size="12" name="Avenir-Medium"/>
@ -571,6 +566,24 @@ DQ
<action selector="undoAction:" target="bMm-q2-fpd" id="Pw9-bY-SW6"/>
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wDx-nO-z0M">
<rect key="frame" x="39" y="0.0" width="54" height="18"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" id="c1w-j2-JT6">
<font key="font" size="13" name="Avenir-Book"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<visibilityPriorities>
<integer value="1000"/>
<integer value="1000"/>
</visibilityPriorities>
<customSpacing>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
</customSpacing>
</stackView>
</subviews>
<constraints>
<constraint firstItem="2ra-RP-SYR" firstAttribute="leading" secondItem="hqW-RG-UOt" secondAttribute="leading" constant="2" id="7mH-Ln-u0a"/>
@ -656,7 +669,7 @@ DQ
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="qLP-tx-m41" customClass="UnderlinedButton" customModule="Clocker" customModuleProvider="target">
<rect key="frame" x="117" y="103" width="293" height="14"/>
<rect key="frame" x="117" y="117" width="293" height="0.0"/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="left" imageScaling="proportionallyDown" inset="2" id="o87-us-e82">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" size="13" name="Avenir-Book"/>

6
Clocker/Onboarding/OnboardingParentViewController.swift

@ -68,15 +68,15 @@ class OnboardingParentViewController: NSViewController {
[negativeButton, backButton].forEach { $0?.isHidden = true }
if #available(OSX 10.16, *) {
if #available(OSX 11.0, *) {
negativeButton.controlSize = .large
positiveButton.controlSize = .large
backButton.controlSize = .large
} else {
}
backButton.title = NSLocalizedString("Back",
comment: "Button title for going back to the previous screen")
}
}
private func setIdentifiersForTests() {
positiveButton.setAccessibilityIdentifier("Forward")

11
Clocker/Onboarding/OnboardingSearchController.swift

@ -2,12 +2,6 @@
import Cocoa
enum States {
case initial
case search
case error
}
class OnboardingSearchController: NSViewController {
@IBOutlet private var appName: NSTextField!
@IBOutlet private var onboardingTypeLabel: NSTextField!
@ -40,6 +34,9 @@ class OnboardingSearchController: NSViewController {
resultsTableView.dataSource = self
resultsTableView.target = self
resultsTableView.doubleAction = #selector(doubleClickAction(_:))
if #available(OSX 11.0, *) {
resultsTableView.style = .fullWidth
}
setup()
@ -293,8 +290,6 @@ class OnboardingSearchController: NSViewController {
guard let self = self else { return }
OperationQueue.main.addOperation {
print("Search string was: \(searchString)")
let currentSearchBarValue = self.searchBar.stringValue
let words = currentSearchBarValue.components(separatedBy: CharacterSet.whitespacesAndNewlines)

2
Clocker/Panel/Notes Popover/NotesPopover.swift

@ -76,7 +76,7 @@ class NotesPopover: NSViewController {
alertPopupButton.setAccessibilityIdentifier("RemindersAlertPopup")
reminderView.setAccessibilityIdentifier("RemindersView")
// if #available(macOS 10.16, *) {
// if #available(OSX 11.0, *) {
// alertPopupButton.controlSize = .large
// }
}

2
Clocker/Panel/ParentPanelController.swift

@ -170,7 +170,7 @@ class ParentPanelController: NSWindowController {
showDebugVersionViewIfNeccesary()
#if DEBUG
if #available(macOS 10.16, *) {
if #available(OSX 11.0, *) {
mainTableView.style = .fullWidth
}
#endif

2
Clocker/Panel/UI/TimezoneDataSource.swift

@ -135,7 +135,7 @@ extension TimezoneDataSource: NSTableViewDataSource, NSTableViewDelegate {
})
if #available(OSX 10.16, *) {
if #available(OSX 11.0, *) {
swipeToDelete.image = Themer.shared().symbolImage(for: "trash.fill")
} else {

Loading…
Cancel
Save