Skip to content

Commit 0cb9b12

Browse files
committed
Prevent widget from covering bottom buttons of Xcode
1 parent dead71c commit 0cb9b12

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Core/Sources/SuggestionWidget/SuggestionWidgetController.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,11 +482,15 @@ extension SuggestionWidgetController {
482482
}
483483
} else if let window = application.focusedWindow,
484484
!["open_quickly"].contains(window.identifier),
485-
let frame = application.focusedWindow?.rect,
485+
var frame = application.focusedWindow?.rect,
486486
frame.size.height > 200,
487487
let screen = NSScreen.screens.first(where: { $0.frame.origin == .zero }),
488488
let firstScreen = NSScreen.main
489489
{
490+
if ["Xcode.WorkspaceWindow"].contains(window.identifier) {
491+
frame.size.height -= 40
492+
}
493+
490494
return UpdateLocationStrategy.FixedToBottom().framesForWindows(
491495
editorFrame: frame,
492496
mainScreen: screen,

0 commit comments

Comments
 (0)