Skip to content

Commit 3734187

Browse files
committed
Filling out extras section
1 parent ac80b6f commit 3734187

2 files changed

Lines changed: 21 additions & 5 deletions

File tree

‎Rectangle/PrefsWindow/SettingsWindow/ShortcutsViewController.swift‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,10 @@ class ShortcutsViewController: NSViewController {
250250
]
251251

252252
let extraCategories: [ShortcutCategory] = [
253+
ShortcutCategory(actions: [.tileRows, .tileColumns]),
254+
ShortcutCategory(actions: [.largerWidth, .smallerWidth]),
255+
ShortcutCategory(actions: [.topVerticalThird, .middleVerticalThird, .bottomVerticalThird, .topVerticalTwoThirds, .bottomVerticalTwoThirds]),
256+
ShortcutCategory(actions: [.topLeftEighth, .topCenterLeftEighth, .topCenterRightEighth, .topRightEighth, .bottomLeftEighth, .bottomCenterLeftEighth, .bottomCenterRightEighth, .bottomRightEighth]),
253257
ShortcutCategory(actions: [.topLeftNinth, .topLeftTwelfth, .topLeftSixteenth])
254258
]
255259

‎Rectangle/WindowAction.swift‎

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ enum WindowAction: Int, Codable {
362362
}
363363

364364
var displayName: String? {
365-
var key: String
365+
var key: String?
366366
var value: String
367367

368368
switch self {
@@ -552,10 +552,22 @@ enum WindowAction: Int, Codable {
552552
value = "Tile Windows in Columns"
553553
case .specified, .reverseAll, .tileAll, .cascadeAll, .leftTodo, .rightTodo, .cascadeActiveApp, .tileActiveApp:
554554
return nil
555-
case .centerProminently, .largerWidth, .smallerWidth, .largerHeight, .smallerHeight:
556-
return nil
557-
case .topVerticalThird, .middleVerticalThird, .bottomVerticalThird, .topVerticalTwoThirds, .bottomVerticalTwoThirds:
555+
case .largerWidth:
556+
value = "Larger Width"
557+
case .smallerWidth:
558+
value = "Smaller Width"
559+
case .centerProminently, .largerHeight, .smallerHeight:
558560
return nil
561+
case .topVerticalThird:
562+
value = "Top Third"
563+
case .middleVerticalThird:
564+
value = "Middle Third"
565+
case .bottomVerticalThird:
566+
value = "Bottom Third"
567+
case .topVerticalTwoThirds:
568+
value = "Top Two Thirds"
569+
case .bottomVerticalTwoThirds:
570+
value = "Bottom Two Thirds"
559571
case .topLeftTwelfth:
560572
key = "topLeftTwelfth.title"
561573
value = "Top Left Twelfth"
@@ -645,7 +657,7 @@ enum WindowAction: Int, Codable {
645657
return nil
646658
}
647659

648-
return NSLocalizedString(key, tableName: "Main", value: value, comment: "")
660+
return NSLocalizedString(key ?? value, tableName: "Main", value: value, comment: "")
649661
}
650662

651663
var notificationName: Notification.Name {

0 commit comments

Comments
 (0)