Browse Source

Remove ClockerSearchField.

pull/113/head
Abhishek Banthia 3 years ago
parent
commit
df55c033e8
  1. 7
      Clocker/Onboarding/Onboarding.storyboard
  2. 3
      Clocker/Onboarding/OnboardingSearchController.swift
  3. 7
      Clocker/Overall App/AppKit + Additions.swift
  4. 2
      Clocker/Preferences/General/PreferencesViewController.swift
  5. 16
      Clocker/Preferences/Preferences.storyboard

7
Clocker/Onboarding/Onboarding.storyboard

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="19529" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="fde-UX-327"> <document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="19529" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="fde-UX-327">
<dependencies> <dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19529"/> <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19529"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
@ -425,7 +426,7 @@ DQ
<scene sceneID="u6P-zw-bJP"> <scene sceneID="u6P-zw-bJP">
<objects> <objects>
<viewController storyboardIdentifier="onboardingSearchVC" id="bMm-q2-fpd" customClass="OnboardingSearchController" customModule="Clocker" customModuleProvider="target" sceneMemberID="viewController"> <viewController storyboardIdentifier="onboardingSearchVC" id="bMm-q2-fpd" customClass="OnboardingSearchController" customModule="Clocker" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" misplaced="YES" id="r3Q-VK-VHF"> <view key="view" id="r3Q-VK-VHF">
<rect key="frame" x="0.0" y="0.0" width="456" height="387"/> <rect key="frame" x="0.0" y="0.0" width="456" height="387"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
@ -453,7 +454,7 @@ DQ
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell> </textFieldCell>
</textField> </textField>
<searchField wantsLayer="YES" verticalHuggingPriority="750" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="D2w-fr-zQp" customClass="ClockerSearchField" customModule="Clocker" customModuleProvider="target"> <searchField wantsLayer="YES" verticalHuggingPriority="750" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="D2w-fr-zQp">
<rect key="frame" x="20" y="235" width="416" height="22"/> <rect key="frame" x="20" y="235" width="416" height="22"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="22" id="7wX-F5-PaV"/> <constraint firstAttribute="height" constant="22" id="7wX-F5-PaV"/>
@ -469,7 +470,7 @@ DQ
<rect key="frame" x="20" y="49" width="416" height="160"/> <rect key="frame" x="20" y="49" width="416" height="160"/>
<clipView key="contentView" ambiguous="YES" id="XpR-1t-AQy"> <clipView key="contentView" ambiguous="YES" id="XpR-1t-AQy">
<rect key="frame" x="0.0" y="0.0" width="416" height="160"/> <rect key="frame" x="0.0" y="0.0" width="416" height="160"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<tableView verticalHuggingPriority="750" ambiguous="YES" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" rowHeight="33" rowSizeStyle="automatic" viewBased="YES" id="30y-X6-i7I"> <tableView verticalHuggingPriority="750" ambiguous="YES" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" rowHeight="33" rowSizeStyle="automatic" viewBased="YES" id="30y-X6-i7I">
<rect key="frame" x="0.0" y="0.0" width="416" height="160"/> <rect key="frame" x="0.0" y="0.0" width="416" height="160"/>

3
Clocker/Onboarding/OnboardingSearchController.swift

@ -16,7 +16,7 @@ import CoreModelKit
class OnboardingSearchController: NSViewController { class OnboardingSearchController: NSViewController {
@IBOutlet private var appName: NSTextField! @IBOutlet private var appName: NSTextField!
@IBOutlet private var onboardingTypeLabel: NSTextField! @IBOutlet private var onboardingTypeLabel: NSTextField!
@IBOutlet private var searchBar: ClockerSearchField! @IBOutlet private var searchBar: NSSearchField!
@IBOutlet private var resultsTableView: NSTableView! @IBOutlet private var resultsTableView: NSTableView!
@IBOutlet private var accessoryLabel: NSTextField! @IBOutlet private var accessoryLabel: NSTextField!
@IBOutlet var undoButton: NSButton! @IBOutlet var undoButton: NSButton!
@ -268,6 +268,7 @@ class OnboardingSearchController: NSViewController {
appName.stringValue = "Quick Add Locations".localized() appName.stringValue = "Quick Add Locations".localized()
onboardingTypeLabel.stringValue = "More search options in Clocker Preferences.".localized() onboardingTypeLabel.stringValue = "More search options in Clocker Preferences.".localized()
setInfoLabel(CLEmptyString) setInfoLabel(CLEmptyString)
searchBar.bezelStyle = .roundedBezel
searchBar.placeholderString = "Press Enter to Search!" searchBar.placeholderString = "Press Enter to Search!"
searchBar.delegate = self searchBar.delegate = self
searchBar.setAccessibility("MainSearchField") searchBar.setAccessibility("MainSearchField")

7
Clocker/Overall App/AppKit + Additions.swift

@ -34,10 +34,3 @@ extension NSFont {
attributes: attributes).size attributes: attributes).size
} }
} }
class ClockerSearchField: NSSearchField {
override func awakeFromNib() {
super.awakeFromNib()
bezelStyle = .roundedBezel
}
}

2
Clocker/Preferences/General/PreferencesViewController.swift

@ -238,6 +238,8 @@ class PreferencesViewController: ParentViewController {
setupColor() setupColor()
startupCheckbox.integerValue = DataStore.shared().retrieve(key: CLStartAtLogin) as? Int ?? 0 startupCheckbox.integerValue = DataStore.shared().retrieve(key: CLStartAtLogin) as? Int ?? 0
searchField.bezelStyle = .roundedBezel
} }
private func setupColor() { private func setupColor() {

16
Clocker/Preferences/Preferences.storyboard

@ -1512,8 +1512,8 @@
<rect key="frame" x="0.0" y="0.0" width="345" height="320"/> <rect key="frame" x="0.0" y="0.0" width="345" height="320"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<searchField toolTip="Search a timezone" wantsLayer="YES" focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Dha-h9-Nd0" customClass="ClockerSearchField" customModule="Clocker" customModuleProvider="target"> <searchField toolTip="Search a timezone" wantsLayer="YES" focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Dha-h9-Nd0">
<rect key="frame" x="8" y="241" width="320" height="23"/> <rect key="frame" x="8" y="205" width="320" height="23"/>
<searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" focusRingType="none" placeholderString="Enter a city, state, country name" usesSingleLineMode="YES" maximumRecents="5" id="ikU-Tm-0WZ"> <searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" focusRingType="none" placeholderString="Enter a city, state, country name" usesSingleLineMode="YES" maximumRecents="5" id="ikU-Tm-0WZ">
<font key="font" size="13" name="Avenir-Light"/> <font key="font" size="13" name="Avenir-Light"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@ -1570,13 +1570,13 @@ DQ
</connections> </connections>
</button> </button>
<scrollView focusRingType="none" borderType="none" autohidesScrollers="YES" horizontalLineScroll="32" horizontalPageScroll="10" verticalLineScroll="32" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0wY-ff-FLW"> <scrollView focusRingType="none" borderType="none" autohidesScrollers="YES" horizontalLineScroll="32" horizontalPageScroll="10" verticalLineScroll="32" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0wY-ff-FLW">
<rect key="frame" x="8" y="30" width="320" height="201"/> <rect key="frame" x="8" y="30" width="320" height="165"/>
<clipView key="contentView" drawsBackground="NO" id="rGc-3M-cCq"> <clipView key="contentView" drawsBackground="NO" id="rGc-3M-cCq">
<rect key="frame" x="0.0" y="0.0" width="320" height="201"/> <rect key="frame" x="0.0" y="0.0" width="320" height="165"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<tableView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" rowHeight="30" rowSizeStyle="automatic" viewBased="YES" id="xkl-2X-ZCb"> <tableView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" rowHeight="30" rowSizeStyle="automatic" viewBased="YES" id="xkl-2X-ZCb">
<rect key="frame" x="0.0" y="0.0" width="320" height="201"/> <rect key="frame" x="0.0" y="0.0" width="320" height="165"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<size key="intercellSpacing" width="3" height="2"/> <size key="intercellSpacing" width="3" height="2"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
@ -1666,14 +1666,14 @@ DQ
</scroller> </scroller>
</scrollView> </scrollView>
<progressIndicator wantsLayer="YES" focusRingType="none" horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" displayedWhenStopped="NO" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="0A5-gp-lay"> <progressIndicator wantsLayer="YES" focusRingType="none" horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" displayedWhenStopped="NO" bezeled="NO" indeterminate="YES" controlSize="small" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="0A5-gp-lay">
<rect key="frame" x="160" y="150" width="16" height="16"/> <rect key="frame" x="160" y="132" width="16" height="16"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="16" id="fgE-77-Vda"/> <constraint firstAttribute="height" constant="16" id="fgE-77-Vda"/>
<constraint firstAttribute="width" constant="16" id="pwe-em-e0a"/> <constraint firstAttribute="width" constant="16" id="pwe-em-e0a"/>
</constraints> </constraints>
</progressIndicator> </progressIndicator>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xgb-wU-8RU"> <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xgb-wU-8RU">
<rect key="frame" x="18" y="120" width="300" height="22"/> <rect key="frame" x="18" y="102" width="300" height="22"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="22" id="zqt-d8-yas"/> <constraint firstAttribute="height" constant="22" id="zqt-d8-yas"/>
</constraints> </constraints>

Loading…
Cancel
Save