We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8bd3b15 commit 1c679a9Copy full SHA for 1c679a9
1 file changed
Core/Sources/SuggestionWidget/SuggestionWidgetController.swift
@@ -176,9 +176,12 @@ public final class SuggestionWidgetController {
176
)
177
widgetWindow.setFrame(anchorFrame, display: false)
178
179
+ let proposedPanelX = anchorFrame.maxX + 8
180
+ let putPanelToTheRight = screen.frame.maxX > proposedPanelX + 450
181
+
182
let panelFrame = CGRect(
- x: anchorFrame.maxX + 8,
- y: anchorFrame.minY - 300 + 30,
183
+ x: putPanelToTheRight ? proposedPanelX : anchorFrame.maxX - 450,
184
+ y: putPanelToTheRight ? anchorFrame.minY - 300 + 30 : anchorFrame.minY - 300 - 4,
185
width: 450,
186
height: 300
187
0 commit comments