diff --git a/DockDoor/Views/Hover Window/WindowPreview.swift b/DockDoor/Views/Hover Window/WindowPreview.swift index 4b3ec0be..eb1f9ae4 100644 --- a/DockDoor/Views/Hover Window/WindowPreview.swift +++ b/DockDoor/Views/Hover Window/WindowPreview.swift @@ -115,7 +115,16 @@ struct WindowPreview: View { } .clipShape(uniformCardRadius ? AnyShape(RoundedRectangle(cornerRadius: 6, style: .continuous)) : AnyShape(Rectangle())) } - .overlay(alignment: windowTitlePosition == .bottomLeft ? .bottomLeading : .bottomTrailing) { + .overlay(alignment: { + switch windowTitlePosition { + case .bottomLeft: + return .bottomLeading + case .bottomRight: + return .bottomTrailing + case .topRight: + return .topTrailing + } + }()) { if showWindowTitle && ((windowTitleDisplayCondition == .always) || (windowTitleDisplayCondition == .windowSwitcherOnly && CurrentWindow.shared.showingTabMenu) || (windowTitleDisplayCondition == .dockPreviewsOnly && !CurrentWindow.shared.showingTabMenu)) { windowTitleOverlay(selected: selected) } diff --git a/DockDoor/consts.swift b/DockDoor/consts.swift index f0b9e9b7..28dd744a 100644 --- a/DockDoor/consts.swift +++ b/DockDoor/consts.swift @@ -60,6 +60,7 @@ enum WindowTitleDisplayCondition: String, CaseIterable, Defaults.Serializable { enum WindowTitlePosition: String, CaseIterable, Defaults.Serializable { case bottomLeft case bottomRight + case topRight var localizedName: String { switch self { @@ -67,6 +68,8 @@ enum WindowTitlePosition: String, CaseIterable, Defaults.Serializable { String(localized: "Bottom Left", comment: "Preview window title position option") case .bottomRight: String(localized: "Bottom Right", comment: "Preview window title position option") + case .topRight: + String(localized: "Top Right", comment: "Preview window title position option") } } }