|
|
|
@ -58,11 +58,17 @@ extension TimezoneDataSource: NSTableViewDataSource, NSTableViewDelegate {
|
|
|
|
|
cellView.rowNumber = row |
|
|
|
|
cellView.customName.stringValue = currentModel.formattedTimezoneLabel() |
|
|
|
|
cellView.time.stringValue = operation.time(with: sliderValue) |
|
|
|
|
cellView.noteLabel.stringValue = currentModel.note ?? CLEmptyString |
|
|
|
|
cellView.noteLabel.toolTip = currentModel.note ?? CLEmptyString |
|
|
|
|
cellView.currentLocationIndicator.isHidden = !currentModel.isSystemTimezone |
|
|
|
|
cellView.time.setAccessibilityIdentifier("ActualTime") |
|
|
|
|
cellView.relativeDate.setAccessibilityIdentifier("RelativeDate") |
|
|
|
|
if let note = currentModel.note, !note.isEmpty { |
|
|
|
|
cellView.noteLabel.stringValue = note |
|
|
|
|
} else if let value = operation.nextDaylightSavingsTransitionIfAvailable(with: sliderValue) { |
|
|
|
|
cellView.noteLabel.stringValue = value |
|
|
|
|
} else { |
|
|
|
|
cellView.noteLabel.stringValue = CLEmptyString |
|
|
|
|
} |
|
|
|
|
cellView.layout(with: currentModel) |
|
|
|
|
|
|
|
|
|
cellView.setAccessibilityIdentifier(currentModel.formattedTimezoneLabel()) |
|
|
|
@ -78,6 +84,7 @@ extension TimezoneDataSource: NSTableViewDataSource, NSTableViewDelegate {
|
|
|
|
|
|
|
|
|
|
if let userFontSize = DataStore.shared().retrieve(key: CLUserFontSizePreference) as? NSNumber, timezones.count > row, let relativeDisplay = DataStore.shared().retrieve(key: CLRelativeDateKey) as? NSNumber { |
|
|
|
|
let model = timezones[row] |
|
|
|
|
let operation = TimezoneDataOperations(with: model) |
|
|
|
|
let shouldShowSunrise = DataStore.shared().shouldDisplay(.sunrise) |
|
|
|
|
|
|
|
|
|
var rowHeight: Int = userFontSize == 4 ? 60 : 65 |
|
|
|
@ -91,7 +98,9 @@ extension TimezoneDataSource: NSTableViewDataSource, NSTableViewDelegate {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if let note = model.note, !note.isEmpty { |
|
|
|
|
rowHeight += userFontSize.intValue + 25 |
|
|
|
|
rowHeight += userFontSize.intValue + 15 |
|
|
|
|
} else if operation.nextDaylightSavingsTransitionIfAvailable(with: sliderValue) != nil { |
|
|
|
|
rowHeight += userFontSize.intValue + 15 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if model.isSystemTimezone { |
|
|
|
|