Browse Source

Tweaks!

pull/101/head
Abhishek 3 years ago
parent
commit
fb3a9f19f3
  1. 8
      Clocker/Clocker/en.lproj/Panel.xib
  2. 5
      Clocker/Events and Reminders/EventCenter.swift
  3. 2
      Clocker/Panel/ParentPanelController+ModernSlider.swift
  4. 1
      Clocker/Panel/ParentPanelController.swift

8
Clocker/Clocker/en.lproj/Panel.xib

@ -42,7 +42,7 @@
<windowCollectionBehavior key="collectionBehavior" moveToActiveSpace="YES" ignoresCycle="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="1000" y="379" width="350" height="460"/>
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1025"/>
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
<view key="contentView" focusRingType="none" misplaced="YES" id="6" customClass="BackgroundPanelView" customModule="Clocker" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="350" height="460"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -412,7 +412,7 @@
<accessibility identifier="UpcomingEventView"/>
</customView>
<customView wantsLayer="YES" focusRingType="none" translatesAutoresizingMaskIntoConstraints="NO" id="C7R-Dq-MFr" userLabel="Slider View">
<rect key="frame" x="0.0" y="-100" width="350" height="30"/>
<rect key="frame" x="0.0" y="115" width="350" height="30"/>
<subviews>
<slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Vf2-uI-yf3">
<rect key="frame" x="7" y="2" width="201" height="23"/>
@ -464,7 +464,7 @@
<rect key="frame" x="0.0" y="40" width="350" height="75"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<scrollView wantsLayer="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasVerticalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="htc-pO-AqH">
<scrollView wantsLayer="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" hasVerticalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="htc-pO-AqH">
<rect key="frame" x="5" y="30" width="340" height="40"/>
<clipView key="contentView" drawsBackground="NO" id="N1e-zE-F86">
<rect key="frame" x="0.0" y="0.0" width="340" height="40"/>
@ -486,7 +486,7 @@
<color key="backgroundColor" name="systemIndigoColor" catalog="System" colorSpace="catalog"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="8II-oP-xbd">
<rect key="frame" x="0.0" y="34" width="340" height="16"/>
<rect key="frame" x="-100" y="-100" width="340" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="f9b-8n-Bt1">

5
Clocker/Events and Reminders/EventCenter.swift

@ -34,6 +34,11 @@ class EventCenter: NSObject {
refetchAll()
}
deinit {
// Just to be super safe
NotificationCenter.default.removeObserver(self)
}
private func refetchAll() {
Logger.info("\nRefetching events from the store")
eventsForDate = [:]

2
Clocker/Panel/ParentPanelController+ModernSlider.swift

@ -3,7 +3,7 @@
import CoreLoggerKit
import Foundation
extension ParentPanelController: NSCollectionViewDataSource, NSCollectionViewDelegate {
extension ParentPanelController: NSCollectionViewDataSource {
func collectionView(_: NSCollectionView, numberOfItemsInSection _: Int) -> Int {
return (96 * PanelConstants.modernSliderDaySupport * 2) + 1
}

1
Clocker/Panel/ParentPanelController.swift

@ -201,7 +201,6 @@ class ParentPanelController: NSWindowController {
if modernSlider != nil {
modernSlider.enclosingScrollView?.scrollerInsets = NSEdgeInsets(top: 0, left: 0, bottom: 100, right: 0)
modernSlider.delegate = self
modernSlider.enclosingScrollView?.backgroundColor = NSColor.clear
modernSlider.postsBoundsChangedNotifications = true
NotificationCenter.default.addObserver(self,

Loading…
Cancel
Save