Closed weisJ closed 3 months ago
It needs to be considered how the custom position should be interpreted on different screens. Either have it be in percentage of the width height of the screen or remember the position per screen. WDYT?
I suppose the implementation might look similar to screen center.
origin
is (500,500) and resolution is (1000,1000), the relative origin would be saved in a format that ensures it will be interpreted as (1000,1000) on a screen with resolution of (2000,2000). This probably can be expressed as a multiplier for screen resolution (e.g. for the example we'll save originMultiplier=(0.5,0.5)
. Later, when Maccy pops up it would place window on the active screen and will use the multiplier to offset accordingly.As I am writing this, I realized that 2.0 misses "Active screen" in "Screen center" - it's a bug that needs to be fixed.
I've fixed screen center logic in https://github.com/p0deje/Maccy/commit/7c844aa250fdf64466e7ce9391cfb1ceca7499d3, you can implement a similar SwiftUI logic for "Last position".
If the positioning mode is set to "Screen center" after moving the Maccy-window manually the position should be saved just as for spotlight. Of course a "reset position" button in the settings would then be beneficial.