Files
macos-stats/ModuleKit/Constants.swift
Serhiy Mytrovtsiy 4d6f759d3b v2.0.0 (#34)
* v2.0.0
* rewritten application from scratch
* new Settings
* new custom popup view
* moved to own implementation of chart
* added more option to configure a widget
* now each module has own widget in the menu bar
* a lot of new features...
2020-06-07 12:22:32 +02:00

44 lines
1.1 KiB
Swift

//
// 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()
}