Browse Source

Update ParentPanelController+ModernSlider.swift

master
Abhishek Banthia 9 months ago
parent
commit
725b7b91e7
  1. 4
      Clocker/Panel/ParentPanelController+ModernSlider.swift

4
Clocker/Panel/ParentPanelController+ModernSlider.swift

@ -146,7 +146,7 @@ extension ParentPanelController {
let remainder = (index % (centerPoint + 1)) let remainder = (index % (centerPoint + 1))
let nextDate = Calendar.current.date(byAdding: .minute, value: remainder * 15, to: closestQuarterTimeRepresentation ?? Date())! let nextDate = Calendar.current.date(byAdding: .minute, value: remainder * 15, to: closestQuarterTimeRepresentation ?? Date())!
let minutes = minutesToHoursAndMinutes(remainder * 15) let minutes = minutesToHoursAndMinutes(remainder * 15)
modernSliderLabel.stringValue = "+\(minutes.hours).\(minutes.leftMinutes)h" modernSliderLabel.stringValue = "+\(minutes.hours):\(minutes.leftMinutes)h"
if resetModernSliderButton.isHidden { if resetModernSliderButton.isHidden {
animateButton(false) animateButton(false)
} }
@ -157,7 +157,7 @@ extension ParentPanelController {
let previousDate = Calendar.current.date(byAdding: .minute, value: -1 * remainder * 15, to: closestQuarterTimeRepresentation ?? Date())! let previousDate = Calendar.current.date(byAdding: .minute, value: -1 * remainder * 15, to: closestQuarterTimeRepresentation ?? Date())!
modernSliderLabel.stringValue = timezoneFormattedStringRepresentation(previousDate) modernSliderLabel.stringValue = timezoneFormattedStringRepresentation(previousDate)
let minutes = minutesToHoursAndMinutes(-1 * remainder * 15) let minutes = minutesToHoursAndMinutes(-1 * remainder * 15)
modernSliderLabel.stringValue = "\(minutes.hours).\(minutes.leftMinutes)h" modernSliderLabel.stringValue = "\(minutes.hours):\(minutes.leftMinutes)h"
if resetModernSliderButton.isHidden { if resetModernSliderButton.isHidden {
animateButton(false) animateButton(false)
} }

Loading…
Cancel
Save