// // Constants.swift // ModuleKit // // Created by Serhiy Mytrovtsiy on 15/04/2020. // Using Swift 5.0. // Running on macOS 10.15. // // Copyright © 2020 Serhiy Mytrovtsiy. All rights reserved. // import Cocoa public struct Popup_c_s { public let width: CGFloat = 264 public let height: CGFloat = 300 public let margins: CGFloat = 8 public let headerHeight: CGFloat = 42 public let separatorHeight: CGFloat = 30 } public struct Settings_c_s { public let width: CGFloat = 539 public let height: CGFloat = 479 public let margin: CGFloat = 10 } public struct Widget_c_s { public let width: CGFloat = 32 public var height: CGFloat { get { let systemHeight = NSApplication.shared.mainMenu?.menuBarHeight return (systemHeight == 0 ? 22 : systemHeight) ?? 22 } } public let margin: CGFloat = 2 } public struct Constants { public static let Popup: Popup_c_s = Popup_c_s() public static let Settings: Settings_c_s = Settings_c_s() public static let Widget: Widget_c_s = Widget_c_s() }