1 parent
a60f1e13db
commit
cea0cff2a7
3 files changed
+4
-4
No files matched your search
@@ -94,7 +94,6 @@ class Preferences {
|
|||||||
|
|
||||||
// constant values
|
// constant values
|
||||||
// not exposed as preferences now but may be in the future, probably through macro preferences
|
// not exposed as preferences now but may be in the future, probably through macro preferences
|
||||||
static var windowMaterial: NSVisualEffectView.Material { .dark }
|
|
||||||
static var fontColor: NSColor { .white }
|
static var fontColor: NSColor { .white }
|
||||||
static var windowPadding: CGFloat { 18 }
|
static var windowPadding: CGFloat { 18 }
|
||||||
static var interCellPadding: CGFloat { 5 }
|
static var interCellPadding: CGFloat { 5 }
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ import Cocoa
|
|||||||
class ThumbnailView: NSStackView {
|
class ThumbnailView: NSStackView {
|
||||||
static let windowsControlSize = CGFloat(16)
|
static let windowsControlSize = CGFloat(16)
|
||||||
static let windowsControlSpacing = CGFloat(8)
|
static let windowsControlSpacing = CGFloat(8)
|
||||||
static let highlightBackgroundColor = NSColor(red: 0, green: 0, blue: 0, alpha: 0.4)
|
static let highlightBackgroundColor = NSColor(red: 0, green: 0, blue: 0, alpha: 0.5)
|
||||||
|
static let highlightBorderColor = NSColor.white
|
||||||
var window_: Window?
|
var window_: Window?
|
||||||
var thumbnail = NSImageView()
|
var thumbnail = NSImageView()
|
||||||
var appIcon = NSImageView()
|
var appIcon = NSImageView()
|
||||||
@@ -103,7 +104,7 @@ class ThumbnailView: NSStackView {
|
|||||||
layer!.backgroundColor = (Preferences.theme == .macOs && isFocused) || (Preferences.theme == .windows10 && isHovered)
|
layer!.backgroundColor = (Preferences.theme == .macOs && isFocused) || (Preferences.theme == .windows10 && isHovered)
|
||||||
? ThumbnailView.highlightBackgroundColor.cgColor : .clear
|
? ThumbnailView.highlightBackgroundColor.cgColor : .clear
|
||||||
layer!.borderColor = (Preferences.theme == .macOs && isHovered) || (Preferences.theme == .windows10 && isFocused)
|
layer!.borderColor = (Preferences.theme == .macOs && isHovered) || (Preferences.theme == .windows10 && isFocused)
|
||||||
? NSColor.controlColor.cgColor : .clear
|
? ThumbnailView.highlightBorderColor.cgColor : .clear
|
||||||
let newFrameInset = (isFocused) ? -Preferences.intraCellPadding : Preferences.intraCellPadding
|
let newFrameInset = (isFocused) ? -Preferences.intraCellPadding : Preferences.intraCellPadding
|
||||||
if newFrameInset != frameInset {
|
if newFrameInset != frameInset {
|
||||||
frameInset = newFrameInset
|
frameInset = newFrameInset
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class ThumbnailsView: NSVisualEffectView {
|
|||||||
|
|
||||||
convenience init() {
|
convenience init() {
|
||||||
self.init(frame: .zero)
|
self.init(frame: .zero)
|
||||||
material = Preferences.windowMaterial
|
material = .dark
|
||||||
state = .active
|
state = .active
|
||||||
wantsLayer = true
|
wantsLayer = true
|
||||||
updateRoundedCorners(Preferences.windowCornerRadius)
|
updateRoundedCorners(Preferences.windowCornerRadius)
|
||||||
|
|||||||
Reference in new issue
Block a user