forked from p0deje/Maccy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate appearance settings to SwiftUI
- Loading branch information
Showing
78 changed files
with
1,001 additions
and
2,771 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import Foundation | ||
import Defaults | ||
|
||
enum HighlightMatch: String, CaseIterable, Identifiable, CustomStringConvertible, Defaults.Serializable { | ||
case bold | ||
case italic | ||
case underline | ||
|
||
var id: Self { self } | ||
|
||
var description: String { | ||
switch self { | ||
case .bold: | ||
return NSLocalizedString("HighlightMatchBold", tableName: "AppearanceSettings", comment: "") | ||
case .italic: | ||
return NSLocalizedString("HighlightMatchItalic", tableName: "AppearanceSettings", comment: "") | ||
case .underline: | ||
return NSLocalizedString("HighlightMatchUnderline", tableName: "AppearanceSettings", comment: "") | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import AppKit | ||
import Defaults | ||
|
||
enum MenuIcon: String, CaseIterable, Identifiable, Defaults.Serializable { | ||
case maccy | ||
case clipboard | ||
case scissors | ||
case paperclip | ||
|
||
var id: Self { self } | ||
|
||
var image: NSImage { | ||
switch self { | ||
case .maccy: | ||
return NSImage(named: .maccyStatusBar)! | ||
case .clipboard: | ||
return NSImage(named: .clipboard)! | ||
case .scissors: | ||
return NSImage(named: .scissors)! | ||
case .paperclip: | ||
return NSImage(named: .paperclip)! | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import Foundation | ||
import Defaults | ||
|
||
enum PinsPosition: String, CaseIterable, Identifiable, CustomStringConvertible, Defaults.Serializable { | ||
case top | ||
case bottom | ||
|
||
var id: Self { self } | ||
|
||
var description: String { | ||
switch self { | ||
case .top: | ||
return NSLocalizedString("PinToTop", tableName: "AppearanceSettings", comment: "") | ||
case .bottom: | ||
return NSLocalizedString("PinToBottom", tableName: "AppearanceSettings", comment: "") | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import Foundation | ||
import Defaults | ||
|
||
enum PopupPosition: String, CaseIterable, Identifiable, CustomStringConvertible, Defaults.Serializable { | ||
case cursor | ||
case statusItem | ||
case window | ||
case center | ||
|
||
var id: Self { self } | ||
|
||
var description: String { | ||
switch self { | ||
case .cursor: | ||
return NSLocalizedString("PopupAtCursor", tableName: "AppearanceSettings", comment: "") | ||
case .statusItem: | ||
return NSLocalizedString("PopupAtMenuBarIcon", tableName: "AppearanceSettings", comment: "") | ||
case .window: | ||
return NSLocalizedString("PopupAtWindowCenter", tableName: "AppearanceSettings", comment: "") | ||
case .center: | ||
return NSLocalizedString("PopupAtScreenCenter", tableName: "AppearanceSettings", comment: "") | ||
} | ||
} | ||
} |
Oops, something went wrong.