mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-26 07:13:24 +03:00
Refactor slightly
This commit is contained in:
parent
e2a4fa713c
commit
ce4227f796
@ -9,11 +9,26 @@ import MaterialIcons
|
||||
public struct Theme {
|
||||
public static let `default` = Self()
|
||||
|
||||
public var foregroundColor = NSColor.textColor
|
||||
public var foregroundColor = NSColor.textColor {
|
||||
didSet {
|
||||
self.closeButtonImage = Icon.close.asImage(
|
||||
dimension: self.iconDimension.width,
|
||||
color: self.foregroundColor
|
||||
)
|
||||
}
|
||||
}
|
||||
public var backgroundColor = NSColor.textBackgroundColor
|
||||
public var separatorColor = NSColor.gridColor
|
||||
|
||||
public var selectedForegroundColor = NSColor.selectedTextColor
|
||||
public var selectedForegroundColor = NSColor.selectedTextColor {
|
||||
didSet {
|
||||
self.selectedCloseButtonImage = Icon.close.asImage(
|
||||
dimension: self.iconDimension.width,
|
||||
color: self.selectedForegroundColor
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
public var selectedBackgroundColor = NSColor.selectedTextBackgroundColor
|
||||
|
||||
public var tabSelectedIndicatorColor = NSColor.selectedTextColor
|
||||
@ -30,7 +45,7 @@ public struct Theme {
|
||||
public var iconDimension = CGSize(width: 16, height: 16)
|
||||
|
||||
public var tabMinWidth: CGFloat {
|
||||
4 * self.tabHorizontalPadding + 2 * self.iconDimension.width + 32
|
||||
3 * self.tabHorizontalPadding + self.iconDimension.width + 32
|
||||
}
|
||||
|
||||
public var tabBarHeight: CGFloat { self.tabHeight }
|
||||
|
Loading…
Reference in New Issue
Block a user