Design improvements.

This commit is contained in:
2025-02-09 12:05:46 -08:00
parent e13df96b68
commit 8527371945
4 changed files with 17 additions and 29 deletions

View File

@@ -9,14 +9,14 @@ fileprivate enum AboutLinks {
}
enum Strings {
static let copyright = "Copyright © 2024\nGarikMI. All rights reserved."
static let evaluationTitle = "License - Evaluation"
static let copyright = "Copyright © 2024\nGarikMI. All rights reserved."
static let evaluationTitle = "License - Evaluation"
static let evaluationMessage = "You are currently using evaluation license. CmdBar will quit after 20 minutes. If you already own a license, enter it below or purchase a license."
static let activate = "Activate"
static let proTitle = "License - Activated"
static let proMessage = "Thank you for purchasing CmdBar! Enjoy!"
static let deactivate = "Deactivate"
static let activating = "Activating..."
static let activate = "Activate"
static let proTitle = "License - Activated"
static let proMessage = "Thank you for purchasing CmdBar! Enjoy!"
static let deactivate = "Deactivate"
static let activating = "Activating..."
}
class AboutViewController: NSViewController, NSTextFieldDelegate {

View File

@@ -7,8 +7,7 @@ class PopoverPanel: NSPanel {
init(viewController: NSViewController) {
super.init(
contentRect: CGRect(x: 0, y: 0, width: 100, height: 100),
styleMask: [.borderless, .nonactivatingPanel, .utilityWindow,
.fullSizeContentView],
styleMask: [.borderless, .nonactivatingPanel, .utilityWindow, .fullSizeContentView],
backing: .buffered,
defer: false
)
@@ -26,8 +25,7 @@ class PopoverPanel: NSPanel {
titlebarAppearsTransparent = true
animationBehavior = .none
collectionBehavior = [.moveToActiveSpace, .fullScreenAuxiliary,
.transient]
collectionBehavior = [.moveToActiveSpace, .fullScreenAuxiliary, .transient]
isReleasedWhenClosed = false
hidesOnDeactivate = false
}
@@ -37,21 +35,13 @@ class PopoverPanel: NSPanel {
let key = event.keyCode
if event.type == NSEvent.EventType.keyDown {
if modsContains(keys: OSCmd, in: modifiers) &&
key == kVK_ANSI_Q
{
if modsContains(keys: OSCmd, in: modifiers) && key == kVK_ANSI_Q {
NSApplication.shared.terminate(self)
return true
} else if modsContains(keys: OSCmd, in: modifiers) &&
key == kVK_ANSI_W
{
} else if modsContains(keys: OSCmd, in: modifiers) && key == kVK_ANSI_W {
resignKey()
return true
} else if modsContains(keys: OSCmd | OSShift,
in: modifiers) &&
key == kVK_ANSI_R
{
} else if modsContains(keys: OSCmd | OSShift, in: modifiers) && key == kVK_ANSI_R {
PathManager.shared.updateIndex()
return true
} else if key == kVK_Escape {

View File

@@ -44,7 +44,7 @@ class SearchViewController: NSViewController, NSTextFieldDelegate, NSPopoverDele
effect.wantsLayer = true
effect.layer?.masksToBounds = true
effect.layer?.borderColor = NSColor.labelColor.withAlphaComponent(0.1).cgColor
effect.layer?.borderColor = NSColor.labelColor.withAlphaComponent(0.2).cgColor
effect.layer?.borderWidth = 1
effect.layer?.cornerRadius = windowCornerRadius
@@ -292,8 +292,8 @@ class SearchViewController: NSViewController, NSTextFieldDelegate, NSPopoverDele
if prog.name.lowercased().contains(searchInput.stringValue.lowercased()) {
programsList[listIndex].path = prog.path
programsList[listIndex].name = prog.name
programsList[listIndex].ext = prog.ext
programsList[listIndex].img = NSWorkspace.shared.icon(forFile: URL(fileURLWithPath: prog.path).appendingPathComponent(prog.name+prog.ext).path)
programsList[listIndex].ext = prog.ext
programsList[listIndex].img = NSWorkspace.shared.icon(forFile: URL(fileURLWithPath: prog.path).appendingPathComponent(prog.name+prog.ext).path)
listIndex += 1
}
}
@@ -336,9 +336,7 @@ class SearchViewController: NSViewController, NSTextFieldDelegate, NSPopoverDele
return listIndex
}
func tableView(_ tableView: NSTableView,
rowViewForRow row: Int) -> NSTableRowView?
{
func tableView(_ tableView: NSTableView, rowViewForRow row: Int) -> NSTableRowView? {
return ProgramsTableRowView()
}

View File

@@ -15,7 +15,7 @@ class ShadowView: NSView {
guard let layer = layer else { return }
let shadow = NSShadow()
shadow.shadowColor = NSColor.black.withAlphaComponent(0.4)
shadow.shadowColor = NSColor.shadowColor.withAlphaComponent(0.4)
shadow.shadowBlurRadius = 20.0
shadow.shadowOffset = CGSize(width: 0, height: -10)
shadow.set()