|
|
|
@ -587,7 +587,7 @@ class ParentPanelController: NSWindowController {
|
|
|
|
|
|
|
|
|
|
private lazy var menubarTitleHandler = MenubarTitleProvider(with: DataStore.shared(), eventStore: EventCenter.sharedCenter()) |
|
|
|
|
|
|
|
|
|
static private let attributes: [NSAttributedString.Key : Any] = [NSAttributedString.Key.font: NSFont.monospacedDigitSystemFont(ofSize: 13.0, weight: NSFont.Weight.regular), |
|
|
|
|
private static let attributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.font: NSFont.monospacedDigitSystemFont(ofSize: 13.0, weight: NSFont.Weight.regular), |
|
|
|
|
NSAttributedString.Key.baselineOffset: 0.1] |
|
|
|
|
|
|
|
|
|
@objc func updateTime() { |
|
|
|
@ -615,6 +615,7 @@ class ParentPanelController: NSWindowController {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let hoverRow = mainTableView.hoverRow |
|
|
|
|
stride(from: 0, to: preferences.count, by: 1).forEach { |
|
|
|
|
let current = preferences[$0] |
|
|
|
|
|
|
|
|
@ -628,11 +629,16 @@ class ParentPanelController: NSWindowController {
|
|
|
|
|
if modernContainerView != nil, modernSlider.isHidden == false, modernContainerView.currentlyInFocus { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let dataOperation = TimezoneDataOperations(with: model, store: DataStore.shared()) |
|
|
|
|
cellView.time.stringValue = dataOperation.time(with: futureSliderValue) |
|
|
|
|
cellView.sunriseSetTime.stringValue = dataOperation.formattedSunriseTime(with: futureSliderValue) |
|
|
|
|
cellView.sunriseSetTime.lineBreakMode = .byClipping |
|
|
|
|
|
|
|
|
|
if $0 != hoverRow { |
|
|
|
|
cellView.relativeDate.stringValue = dataOperation.date(with: futureSliderValue, displayType: .panel) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
cellView.currentLocationIndicator.isHidden = !model.isSystemTimezone |
|
|
|
|
cellView.sunriseImage.image = model.isSunriseOrSunset ? Themer.shared().sunriseImage() : Themer.shared().sunsetImage() |
|
|
|
|
if #available(macOS 10.14, *) { |
|
|
|
@ -1130,7 +1136,8 @@ extension ParentPanelController: NSSharingServicePickerDelegate {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let timezoneOperations = TimezoneDataOperations(with: earliestTimezone, store: DataStore.shared()) |
|
|
|
|
var sectionTitle = timezoneOperations.todaysDate(with: 0) // TODO: Take slider value into consideration |
|
|
|
|
let futureSliderValue = datasource?.sliderValue ?? 0 |
|
|
|
|
var sectionTitle = timezoneOperations.todaysDate(with: futureSliderValue) |
|
|
|
|
clipboardCopy.append("\(sectionTitle)\n") |
|
|
|
|
|
|
|
|
|
stride(from: 0, to: sortedByTime.count, by: 1).forEach { |
|
|
|
@ -1138,8 +1145,8 @@ extension ParentPanelController: NSSharingServicePickerDelegate {
|
|
|
|
|
let dataModel = TimezoneData.customObject(from: sortedByTime[$0]) |
|
|
|
|
{ |
|
|
|
|
let dataOperations = TimezoneDataOperations(with: dataModel, store: DataStore.shared()) |
|
|
|
|
let date = dataOperations.todaysDate(with: 0) |
|
|
|
|
let time = dataOperations.time(with: 0) |
|
|
|
|
let date = dataOperations.todaysDate(with: futureSliderValue) |
|
|
|
|
let time = dataOperations.time(with: futureSliderValue) |
|
|
|
|
if date != sectionTitle { |
|
|
|
|
sectionTitle = date |
|
|
|
|
clipboardCopy.append("\n\(sectionTitle)\n") |
|
|
|
|